Boost logo

Boost :

Subject: [boost] [type_index] C++03 implementation in boost?
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2012-07-01 20:41:43


After crafting my own `type_info_ptr` as a thin wrapper to be able to
use `std::type_info` as key in maps, I found out about the new
`std::type_index` in C++11.

It seems that a C++03 implementation would be trivial, except for the
hashing functionality. Could that functionality be built by leveraging
implementation specific details like whether there is only one
`type_info` instance for each type, or whether the name member function
returns distinct values?

I believe it would be a nice addition to Boost, perhaps as part of the
utility library. It would be useful for those wanting to use C++11
features while still writing C++03 compatible code.

Agustín K-ballo Bergé.-
http://fusionfenix.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk