|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78854 - in branches/release: . libs libs/functional libs/functional/hash/test
From: dnljms_at_[hidden]
Date: 2012-06-07 15:50:11
Author: danieljames
Date: 2012-06-07 15:50:10 EDT (Thu, 07 Jun 2012)
New Revision: 78854
URL: http://svn.boost.org/trac/boost/changeset/78854
Log:
Hash: Merge test fix.
Properties modified:
branches/release/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/functional/ (props changed)
Text files modified:
branches/release/libs/functional/hash/test/hash_type_index_test.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
Modified: branches/release/libs/functional/hash/test/hash_type_index_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_type_index_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_type_index_test.cpp 2012-06-07 15:50:10 EDT (Thu, 07 Jun 2012)
@@ -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 @@
BOOST_TEST(hasher(int_index) == hasher(int2_index));
BOOST_TEST(hasher(int_index) != hasher(char_index));
+#endif
}
#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk