#include "trait.h" struct Shape : public Trait { template Shape(T t) : Trait(std::move(t)), area([this]() { return ShapeImpl::area(cast()); }) { } std::function area; };