std::polymorphic_value + Duck Typing = Type Erasure
I recently had an insight about type erasure that I wanted to share.
Type erasure is a combination of two techniques working together to achieve both polymorphism and value semantics:
std::polymorphic_value
, a proposed standard library type, and duck typing.