Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86137 - trunk/boost/pending
From: jewillco_at_[hidden]
Date: 2013-10-02 15:15:21


Author: jewillco
Date: 2013-10-02 15:15:21 EDT (Wed, 02 Oct 2013)
New Revision: 86137
URL: http://svn.boost.org/trac/boost/changeset/86137

Log:
Made boost::unordered inclusion unconditional; removed support for non-partial-specialization compilers; enabled C++11 unordered containers when they are present; refs #8962

Text files modified:
   trunk/boost/pending/container_traits.hpp | 91 ++++++++++++++++++++++++++++++++++++++-
   1 files changed, 88 insertions(+), 3 deletions(-)

Modified: trunk/boost/pending/container_traits.hpp
==============================================================================
--- trunk/boost/pending/container_traits.hpp Wed Oct 2 15:10:30 2013 (r86136)
+++ trunk/boost/pending/container_traits.hpp 2013-10-02 15:15:21 EDT (Wed, 02 Oct 2013) (r86137)
@@ -30,6 +30,14 @@
 # endif
 #endif
 
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+#include <unordered_set>
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#include <unordered_map>
+#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 @@
     { };
 
 
-#ifndef BOOST_NO_HASH
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
   template <class Key, class Eq, class Hash, class Alloc>
   struct container_traits< boost::unordered_set<Key,Eq,Hash,Alloc> > {
     typedef unordered_set_tag category;
@@ -302,7 +308,7 @@
     typedef unordered_multimap_tag category;
     typedef unstable_tag iterator_stability;
   };
-#endif
+
   template <class Key, class Eq, class Hash, class Alloc>
   unordered_set_tag
   container_category(const boost::unordered_set<Key,Eq,Hash,Alloc>&)
@@ -339,8 +345,87 @@
   unstable_tag
   iterator_stability(const boost::unordered_multimap<Key,T,Eq,Hash,Alloc>&)
   { return unstable_tag(); }
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ struct container_traits< std::unordered_set<Key,Eq,Hash,Alloc> > {
+ typedef unordered_set_tag category;
+ typedef unstable_tag iterator_stability;
+ };
+#endif
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ struct container_traits< std::unordered_map<Key,T,Eq,Hash,Alloc> > {
+ typedef unordered_map_tag category;
+ typedef unstable_tag iterator_stability;
+ };
+#endif
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ struct container_traits< std::unordered_multiset<Key,Eq,Hash,Alloc> > {
+ typedef unordered_multiset_tag category;
+ typedef unstable_tag iterator_stability;
+ };
+#endif
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ struct container_traits< std::unordered_multimap<Key,T,Eq,Hash,Alloc> > {
+ typedef unordered_multimap_tag category;
+ typedef unstable_tag iterator_stability;
+ };
+#endif
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ unordered_set_tag
+ container_category(const std::unordered_set<Key,Eq,Hash,Alloc>&)
+ { return unordered_set_tag(); }
 #endif
 
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ unordered_map_tag
+ container_category(const std::unordered_map<Key,T,Eq,Hash,Alloc>&)
+ { return unordered_map_tag(); }
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ unstable_tag iterator_stability(const std::unordered_set<Key,Eq,Hash,Alloc>&)
+ { return unstable_tag(); }
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ unstable_tag iterator_stability(const std::unordered_map<Key,T,Eq,Hash,Alloc>&)
+ { return unstable_tag(); }
+#endif
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ unordered_multiset_tag
+ container_category(const std::unordered_multiset<Key,Eq,Hash,Alloc>&)
+ { return unordered_multiset_tag(); }
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ unordered_multimap_tag
+ container_category(const std::unordered_multimap<Key,T,Eq,Hash,Alloc>&)
+ { return unordered_multimap_tag(); }
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ template <class Key, class Eq, class Hash, class Alloc>
+ unstable_tag
+ iterator_stability(const std::unordered_multiset<Key,Eq,Hash,Alloc>&)
+ { return unstable_tag(); }
+#endif
+
+#ifndef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ template <class Key, class T, class Eq, class Hash, class Alloc>
+ unstable_tag
+ iterator_stability(const std::unordered_multimap<Key,T,Eq,Hash,Alloc>&)
+ { return unstable_tag(); }
+#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