Skip to content
  • 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). The void* signature is only needed if you want to keep the TES' ability to downcast multiple types into T*.

  • I was actually thinking of specializing cast_ to allow conversion to base... not sure if that can be done yet ;-) And yes, put is far too simple, but then again, this is a proof-of-principle working store in less than 100 lines of code...

  • @sponce, @clemenci -- FYI...

  • @rmatev, @nnolte -- FYI...

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment