Idiomatic C++ Expressions
CRTP and policy-based design, type erasure alongside PImpl, and expression templates, serialization, and prototype registries.
CRTP and policy-based design
Two idiomatic C++ expressions of static polymorphism on the shipping-rate domain: a CRTP base that resolves a derived type's method at compile time, a reusable CRTP mixin across unrelated types, and a host class composed from compile-time policies with no runtime dispatch.
Type erasure and PImpl
Type erasure as a value-semantic wrapper around a hand-written concept/model pair that holds unrelated quoters with no shared base class, and PImpl as a compilation firewall: correct special members, ABI stability, and when each idiom earns its cost.
Expression templates and generic idioms
Expression templates that build a compile-time expression tree so a+b+c evaluates in one pass with no intermediate objects, plus two supporting idioms from the same freight-route domain: a self-registering Prototype registry and a single describe hook that drives both serialize() and deserialize().