forked from boostorg/unordered
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)
|
||||
|
Reference in New Issue
Block a user