diff options
Diffstat (limited to 'libs/config/test/boost_no_cxx11_hdr_typeindex.ipp')
-rw-r--r-- | libs/config/test/boost_no_cxx11_hdr_typeindex.ipp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libs/config/test/boost_no_cxx11_hdr_typeindex.ipp b/libs/config/test/boost_no_cxx11_hdr_typeindex.ipp new file mode 100644 index 0000000000..aa0358c7e6 --- /dev/null +++ b/libs/config/test/boost_no_cxx11_hdr_typeindex.ipp @@ -0,0 +1,25 @@ +// (C) Copyright Beman Dawes 2009 + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for more information. + +// MACRO: BOOST_NO_CXX11_HDR_TYPEINDEX +// TITLE: C++0x header <typeindex> unavailable +// DESCRIPTION: The standard library does not supply C++0x header <typeindex> + +#include <typeindex> + +namespace boost_no_cxx11_hdr_typeindex { + +int test() +{ + std::type_index t1 = typeid(int); + std::type_index t2 = typeid(double); + std::hash<std::type_index> h; + return (t1 != t2) && (h(t1) != h(t2)) ? 0 : 1; +} + +} |