[Boost-bugs] [Boost C++ Libraries] #4756: Support for C++0x type_index in hash

Subject: [Boost-bugs] [Boost C++ Libraries] #4756: Support for C++0x type_index in hash
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-19 10:22:24


#4756: Support for C++0x type_index in hash
--------------------------------+-------------------------------------------
 Reporter: ru.elric@… | Owner: danieljames
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: hash
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 Boost hash currently does not support C++0x std::type_index.

 Boost has a #define for availability of <typeindex> header -
 BOOST_NO_0X_HDR_TYPEINDEX. Therefore, adding support for std::type_index
 should be pretty straightforward.

 Something along the lines could do:
 {{{
 #ifndef BOOST_NO_0X_HDR_TYPEINDEX
 #include <typeindex>

 namespace boost {
   std::size_t hash_value(const std::type_index &v) {
     return v.hash_code();
   }
 }
 #endif
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4756>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC