This commit is contained in:
Daniel James
2017-05-01 21:03:11 +01:00
parent 35522d3ee0
commit 2e14c340a8
5 changed files with 20 additions and 24 deletions

View File

@ -13,13 +13,13 @@
#pragma once #pragma once
#endif #endif
#include <boost/predef.h>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/detail/no_exceptions_support.hpp> #include <boost/detail/no_exceptions_support.hpp>
#include <boost/detail/select_type.hpp> #include <boost/detail/select_type.hpp>
#include <boost/iterator/iterator_categories.hpp> #include <boost/iterator/iterator_categories.hpp>
#include <boost/limits.hpp> #include <boost/limits.hpp>
#include <boost/move/move.hpp> #include <boost/move/move.hpp>
#include <boost/predef.h>
#include <boost/preprocessor/arithmetic/inc.hpp> #include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition/enum.hpp> #include <boost/preprocessor/repetition/enum.hpp>
@ -114,7 +114,7 @@
// //
#if defined(BOOST_UNORDERED_TUPLE_ARGS) #if defined(BOOST_UNORDERED_TUPLE_ARGS)
#elif BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0) #elif BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0)
// I had problems with tuples on older versions of the sunpro. // I had problems with tuples on older versions of the sunpro.
// Might be fixed in an earlier version than I specified here. // Might be fixed in an earlier version than I specified here.
#define BOOST_UNORDERED_TUPLE_ARGS 0 #define BOOST_UNORDERED_TUPLE_ARGS 0
@ -242,7 +242,7 @@ template <class T> struct prime_list_template
{ {
static std::size_t const value[]; static std::size_t const value[];
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
static std::ptrdiff_t const length; static std::ptrdiff_t const length;
#else #else
static std::ptrdiff_t const length = static std::ptrdiff_t const length =
@ -254,7 +254,7 @@ template <class T>
std::size_t const prime_list_template<T>::value[] = { std::size_t const prime_list_template<T>::value[] = {
BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)}; BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)};
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
template <class T> template <class T>
std::ptrdiff_t const prime_list_template<T>::length = BOOST_PP_SEQ_SIZE( std::ptrdiff_t const prime_list_template<T>::length = BOOST_PP_SEQ_SIZE(
BOOST_UNORDERED_PRIMES); BOOST_UNORDERED_PRIMES);
@ -1308,7 +1308,7 @@ inline void construct_value(T* address, BOOST_FWD_REF(A0) a0)
// //
// Used to emulate piecewise construction. // Used to emulate piecewise construction.
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
#define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(z, n, namespace_) \ #define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(z, n, namespace_) \
template <typename Alloc, typename T, \ template <typename Alloc, typename T, \
@ -1965,8 +1965,7 @@ struct cl_iterator
{ {
} }
cl_iterator( cl_iterator(boost::unordered::iterator_detail::l_iterator<Node> const& x)
boost::unordered::iterator_detail::l_iterator<Node> const& x)
BOOST_NOEXCEPT : ptr_(x.ptr_), BOOST_NOEXCEPT : ptr_(x.ptr_),
bucket_(x.bucket_), bucket_(x.bucket_),
bucket_count_(x.bucket_count_) bucket_count_(x.bucket_count_)

View File

@ -35,10 +35,8 @@ template <typename A, typename T, typename H, typename P> struct set
typedef boost::unordered::iterator_detail::c_iterator<node> iterator; typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator; typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
typedef boost::unordered::iterator_detail::cl_iterator<node> typedef boost::unordered::iterator_detail::cl_iterator<node> l_iterator;
l_iterator; typedef boost::unordered::iterator_detail::cl_iterator<node> cl_iterator;
typedef boost::unordered::iterator_detail::cl_iterator<node>
cl_iterator;
typedef boost::unordered::node_handle_set<node, T, A> node_type; typedef boost::unordered::node_handle_set<node, T, A> node_type;
typedef boost::unordered::insert_return_type_set<node, T, A> typedef boost::unordered::insert_return_type_set<node, T, A>

View File

@ -230,7 +230,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
// 0 argument emplace requires special treatment in case // 0 argument emplace requires special treatment in case
// the container is instantiated with a value type that // the container is instantiated with a value type that
@ -292,7 +292,7 @@ template <class K, class T, class H, class P, class A> class unordered_map
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
iterator emplace_hint(const_iterator hint, iterator emplace_hint(const_iterator hint,
boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace =
@ -1031,7 +1031,7 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
// 0 argument emplace requires special treatment in case // 0 argument emplace requires special treatment in case
// the container is instantiated with a value type that // the container is instantiated with a value type that
@ -1091,7 +1091,7 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
iterator emplace_hint(const_iterator hint, iterator emplace_hint(const_iterator hint,
boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace =

View File

@ -228,7 +228,7 @@ template <class T, class H, class P, class A> class unordered_set
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
// 0 argument emplace requires special treatment in case // 0 argument emplace requires special treatment in case
// the container is instantiated with a value type that // the container is instantiated with a value type that
@ -290,7 +290,7 @@ template <class T, class H, class P, class A> class unordered_set
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
iterator emplace_hint(const_iterator hint, iterator emplace_hint(const_iterator hint,
boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace =
@ -737,7 +737,7 @@ template <class T, class H, class P, class A> class unordered_multiset
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
// 0 argument emplace requires special treatment in case // 0 argument emplace requires special treatment in case
// the container is instantiated with a value type that // the container is instantiated with a value type that
@ -797,7 +797,7 @@ template <class T, class H, class P, class A> class unordered_multiset
#else #else
#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5, 21, 0))
iterator emplace_hint(const_iterator hint, iterator emplace_hint(const_iterator hint,
boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace =

View File

@ -170,8 +170,8 @@ void merge_into_empty_test(X*, test::random_generator generator)
} }
template <class X1, class X2> template <class X1, class X2>
void merge_into_unique_keys_test( void merge_into_unique_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
X1*, X2*, int hash_equal1, int hash_equal2, test::random_generator generator) test::random_generator generator)
{ {
test::check_instances check_; test::check_instances check_;
@ -206,8 +206,8 @@ void merge_into_unique_keys_test(
} }
template <class X1, class X2> template <class X1, class X2>
void merge_into_equiv_keys_test( void merge_into_equiv_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
X1*, X2*, int hash_equal1, int hash_equal2, test::random_generator generator) test::random_generator generator)
{ {
test::check_instances check_; test::check_instances check_;
@ -339,7 +339,6 @@ UNORDERED_TEST(merge_into_equiv_keys_test,
((0)(1)(2)) ((0)(1)(2))
((default_generator)(generate_collisions))) ((default_generator)(generate_collisions)))
// clang-format on // clang-format on
} }
RUN_TESTS() RUN_TESTS()