mirror of
https://github.com/boostorg/functional.git
synced 2025-08-01 05:24:31 +02:00
Hash: Merge test fix.
[SVN r78854]
This commit is contained in:
@@ -18,12 +18,16 @@
|
||||
#include <typeindex>
|
||||
|
||||
void test_type_index() {
|
||||
HASH_NAMESPACE::hash<std::type_index> hasher;
|
||||
|
||||
#if defined(BOOST_NO_TYPEID)
|
||||
std::cout<<"Unable to test std::type_index, as typeid isn't available"
|
||||
<<std::endl;
|
||||
#else
|
||||
std::type_index int_index = typeid(int);
|
||||
std::type_index int2_index = typeid(int);
|
||||
std::type_index char_index = typeid(char);
|
||||
|
||||
HASH_NAMESPACE::hash<std::type_index> hasher;
|
||||
|
||||
BOOST_TEST(hasher(int_index) == int_index.hash_code());
|
||||
BOOST_TEST(hasher(int_index) == int2_index.hash_code());
|
||||
BOOST_TEST(hasher(char_index) == char_index.hash_code());
|
||||
@@ -33,6 +37,7 @@ void test_type_index() {
|
||||
|
||||
BOOST_TEST(hasher(int_index) == hasher(int2_index));
|
||||
BOOST_TEST(hasher(int_index) != hasher(char_index));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user