Type-safe western theory wrangling in C++