From 4fc3cbfaae0ccd278c8e8fd06da64b96e5250eab Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Wed, 2 Oct 2013 19:15:21 +0000 Subject: [PATCH] Made boost::unordered inclusion unconditional; removed support for non-partial-specialization compilers; enabled C++11 unordered containers when they are present; refs #8962 [SVN r86137] --- include/boost/pending/container_traits.hpp | 91 +++++++++++++++++++++- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/include/boost/pending/container_traits.hpp b/include/boost/pending/container_traits.hpp index 3b070754..803df77a 100644 --- a/include/boost/pending/container_traits.hpp +++ b/include/boost/pending/container_traits.hpp @@ -30,6 +30,14 @@ # endif #endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET +#include +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP +#include +#endif + // The content of this file is in 'graph_detail' because otherwise // there will be name clashes with // sandbox/boost/sequence_algo/container_traits.hpp @@ -280,8 +288,6 @@ namespace boost { namespace graph_detail { { }; -#ifndef BOOST_NO_HASH -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct container_traits< boost::unordered_set > { typedef unordered_set_tag category; @@ -302,7 +308,7 @@ namespace boost { namespace graph_detail { typedef unordered_multimap_tag category; typedef unstable_tag iterator_stability; }; -#endif + template unordered_set_tag container_category(const boost::unordered_set&) @@ -339,8 +345,87 @@ namespace boost { namespace graph_detail { unstable_tag iterator_stability(const boost::unordered_multimap&) { return unstable_tag(); } + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + struct container_traits< std::unordered_set > { + typedef unordered_set_tag category; + typedef unstable_tag iterator_stability; + }; +#endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + struct container_traits< std::unordered_map > { + typedef unordered_map_tag category; + typedef unstable_tag iterator_stability; + }; +#endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + struct container_traits< std::unordered_multiset > { + typedef unordered_multiset_tag category; + typedef unstable_tag iterator_stability; + }; +#endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + struct container_traits< std::unordered_multimap > { + typedef unordered_multimap_tag category; + typedef unstable_tag iterator_stability; + }; +#endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + unordered_set_tag + container_category(const std::unordered_set&) + { return unordered_set_tag(); } #endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + unordered_map_tag + container_category(const std::unordered_map&) + { return unordered_map_tag(); } +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + unstable_tag iterator_stability(const std::unordered_set&) + { return unstable_tag(); } +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + unstable_tag iterator_stability(const std::unordered_map&) + { return unstable_tag(); } +#endif +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + unordered_multiset_tag + container_category(const std::unordered_multiset&) + { return unordered_multiset_tag(); } +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + unordered_multimap_tag + container_category(const std::unordered_multimap&) + { return unordered_multimap_tag(); } +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + template + unstable_tag + iterator_stability(const std::unordered_multiset&) + { return unstable_tag(); } +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP + template + unstable_tag + iterator_stability(const std::unordered_multimap&) + { return unstable_tag(); } +#endif //===========================================================================