Opened 12 years ago
Closed 12 years ago
#4756 closed Feature Requests (fixed)
Support for C++0x type_index in hash
Reported by: | Owned by: | Daniel James | |
---|---|---|---|
Milestone: | Boost 1.46.0 | Component: | hash |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
Milestone: | To Be Determined → Boost-1.46.0 |
---|---|
Status: | new → assigned |
by , 12 years ago
comment:3 by , 12 years ago
I believe there is a problem with the patch.
The following forward declaration must not be a template:
template <class Ch, class A> std::size_t hash_value(std::type_index);
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Patch that resolves the issue.