Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

std::type_index hash for tbb

klaim
Beginner
239 Views
Hi, It would be helpful for c++11 users that TBB provide it's implementation of hashing for std::type_index, so that it can be used as index in tbb::concurrent_unordered_map for example. Here is the implementation I'm using in one project: namespace tbb { template<> size_t tbb_hasher( const std::type_index& idx ) { return std::hash<:TYPE_INDEX>()( idx ); } }
0 Kudos
0 Replies
Reply