mirror of
				https://github.com/boostorg/unordered.git
				synced 2025-11-04 01:31:41 +01:00 
			
		
		
		
	Merged revisions 49661-49662,49666,49669,49735,49756,49770,49811 via svnmerge from
https://svn.boost.org/svn/boost/trunk ........ r49661 | danieljames | 2008-11-09 12:03:45 +0000 (Sun, 09 Nov 2008) | 1 line Move hash detail headers out of boost/functional/detail. ........ r49662 | danieljames | 2008-11-09 12:11:50 +0000 (Sun, 09 Nov 2008) | 1 line Add a forwarding header for container_fwd.hpp ........ r49666 | danieljames | 2008-11-09 19:12:05 +0000 (Sun, 09 Nov 2008) | 1 line Avoid comparing default initialised iterators in position_iterator. ........ r49669 | danieljames | 2008-11-09 21:57:38 +0000 (Sun, 09 Nov 2008) | 2 lines Add link to the header to the synopsis in reference documentation. Refs #2214 ........ r49735 | danieljames | 2008-11-14 12:51:00 +0000 (Fri, 14 Nov 2008) | 1 line Explicitly specify the template parameters in the unordered container friend, in order to avoid some warnings. ........ r49756 | danieljames | 2008-11-14 16:11:16 +0000 (Fri, 14 Nov 2008) | 1 line Use pragmas to suppress a Visual C++ warning. ........ r49770 | danieljames | 2008-11-15 13:07:29 +0000 (Sat, 15 Nov 2008) | 1 line Use the new swap library. ........ r49811 | danieljames | 2008-11-16 23:10:00 +0000 (Sun, 16 Nov 2008) | 1 line Fix a typo. ........ [SVN r49855]
This commit is contained in:
		@@ -29,6 +29,7 @@
 | 
			
		||||
#include <boost/mpl/if.hpp>
 | 
			
		||||
#include <boost/mpl/and.hpp>
 | 
			
		||||
#include <boost/detail/workaround.hpp>
 | 
			
		||||
#include <boost/utility/swap.hpp>
 | 
			
		||||
 | 
			
		||||
#include <boost/mpl/aux_/config/eti.hpp>
 | 
			
		||||
 | 
			
		||||
@@ -58,17 +59,6 @@ namespace boost {
 | 
			
		||||
        static const std::size_t default_initial_bucket_count = 50;
 | 
			
		||||
        static const float minimum_max_load_factor = 1e-3f;
 | 
			
		||||
 | 
			
		||||
        template <class T>
 | 
			
		||||
        inline void hash_swap(T& x, T& y)
 | 
			
		||||
        {
 | 
			
		||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
 | 
			
		||||
            std::swap(x,y);
 | 
			
		||||
#else
 | 
			
		||||
            using std::swap;
 | 
			
		||||
            swap(x, y);
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        inline std::size_t double_to_size_t(double f)
 | 
			
		||||
        {
 | 
			
		||||
            return f >= static_cast<double>((std::numeric_limits<std::size_t>::max)()) ?
 | 
			
		||||
 
 | 
			
		||||
@@ -143,8 +143,8 @@ namespace boost {
 | 
			
		||||
 | 
			
		||||
                void swap(allocators& x)
 | 
			
		||||
                {
 | 
			
		||||
                    unordered_detail::hash_swap(node_alloc_, x.node_alloc_);
 | 
			
		||||
                    unordered_detail::hash_swap(bucket_alloc_, x.bucket_alloc_);
 | 
			
		||||
                    boost::swap(node_alloc_, x.node_alloc_);
 | 
			
		||||
                    boost::swap(bucket_alloc_, x.bucket_alloc_);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                bool operator==(allocators const& x)
 | 
			
		||||
@@ -238,10 +238,10 @@ namespace boost {
 | 
			
		||||
 | 
			
		||||
                void swap(allocators& x)
 | 
			
		||||
                {
 | 
			
		||||
                    unordered_detail::hash_swap(node_alloc_, x.node_alloc_);
 | 
			
		||||
                    unordered_detail::hash_swap(bucket_alloc_, x.bucket_alloc_);
 | 
			
		||||
                    unordered_detail::hash_swap(value_alloc_, x.value_alloc_);
 | 
			
		||||
                    unordered_detail::hash_swap(node_base_alloc_, x.node_base_alloc_);
 | 
			
		||||
                    boost::swap(node_alloc_, x.node_alloc_);
 | 
			
		||||
                    boost::swap(bucket_alloc_, x.bucket_alloc_);
 | 
			
		||||
                    boost::swap(value_alloc_, x.value_alloc_);
 | 
			
		||||
                    boost::swap(node_base_alloc_, x.node_base_alloc_);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                bool operator==(allocators const& x)
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,15 @@
 | 
			
		||||
#include <boost/unordered/detail/move.hpp>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(BOOST_MSVC)
 | 
			
		||||
#pragma warning(push)
 | 
			
		||||
#if BOOST_MSVC >= 1400
 | 
			
		||||
#pragma warning(disable:4396) //the inline specifier cannot be used when a
 | 
			
		||||
                              // friend declaration refers to a specialization
 | 
			
		||||
                              // of a function template
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
namespace boost
 | 
			
		||||
{
 | 
			
		||||
    template <class Key, class T, class Hash, class Pred, class Alloc>
 | 
			
		||||
@@ -385,8 +394,8 @@ namespace boost
 | 
			
		||||
        friend bool operator==(unordered_map const&, unordered_map const&);
 | 
			
		||||
        friend bool operator!=(unordered_map const&, unordered_map const&);
 | 
			
		||||
#else
 | 
			
		||||
        friend bool operator==<>(unordered_map const&, unordered_map const&);
 | 
			
		||||
        friend bool operator!=<>(unordered_map const&, unordered_map const&);
 | 
			
		||||
        friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
 | 
			
		||||
        friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
 | 
			
		||||
#endif
 | 
			
		||||
    }; // class template unordered_map
 | 
			
		||||
 | 
			
		||||
@@ -757,8 +766,8 @@ namespace boost
 | 
			
		||||
        friend bool operator==(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
        friend bool operator!=(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
#else
 | 
			
		||||
        friend bool operator==<>(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
        friend bool operator!=<>(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
        friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
        friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
 | 
			
		||||
#endif
 | 
			
		||||
    }; // class template unordered_multimap
 | 
			
		||||
 | 
			
		||||
@@ -785,4 +794,8 @@ namespace boost
 | 
			
		||||
 | 
			
		||||
} // namespace boost
 | 
			
		||||
 | 
			
		||||
#if defined(BOOST_MSVC)
 | 
			
		||||
#pragma warning(pop)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,15 @@
 | 
			
		||||
#include <boost/unordered/detail/move.hpp>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(BOOST_MSVC)
 | 
			
		||||
#pragma warning(push)
 | 
			
		||||
#if BOOST_MSVC >= 1400
 | 
			
		||||
#pragma warning(disable:4396) //the inline specifier cannot be used when a
 | 
			
		||||
                              // friend declaration refers to a specialization
 | 
			
		||||
                              // of a function template
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
namespace boost
 | 
			
		||||
{
 | 
			
		||||
    template <class Value, class Hash, class Pred, class Alloc>
 | 
			
		||||
@@ -357,8 +366,8 @@ namespace boost
 | 
			
		||||
        friend bool operator==(unordered_set const&, unordered_set const&);
 | 
			
		||||
        friend bool operator!=(unordered_set const&, unordered_set const&);
 | 
			
		||||
#else
 | 
			
		||||
        friend bool operator==<>(unordered_set const&, unordered_set const&);
 | 
			
		||||
        friend bool operator!=<>(unordered_set const&, unordered_set const&);
 | 
			
		||||
        friend bool operator==<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
 | 
			
		||||
        friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
 | 
			
		||||
#endif
 | 
			
		||||
    }; // class template unordered_set
 | 
			
		||||
 | 
			
		||||
@@ -714,8 +723,8 @@ namespace boost
 | 
			
		||||
        friend bool operator==(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
        friend bool operator!=(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
#else
 | 
			
		||||
        friend bool operator==<>(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
        friend bool operator!=<>(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
        friend bool operator==<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
        friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
 | 
			
		||||
#endif
 | 
			
		||||
    }; // class template unordered_multiset
 | 
			
		||||
 | 
			
		||||
@@ -742,4 +751,8 @@ namespace boost
 | 
			
		||||
 | 
			
		||||
} // namespace boost
 | 
			
		||||
 | 
			
		||||
#if defined(BOOST_MSVC)
 | 
			
		||||
#pragma warning(pop)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user