-
Pretty neat!
Beware that put must handle duplicate insertion.
Also, cast's signature seems overkill if you aim for exact type equality. In this case, it can be simply
bool(std::type_index)
. Thevoid*
signature is only needed if you want to keep the TES' ability to downcast multiple types intoT*
. -
@raaij: FYI
Please register or sign in to comment