diff --git a/doc/changes.qbk b/doc/changes.qbk
index f4e42f63..fef7b59b 100644
--- a/doc/changes.qbk
+++ b/doc/changes.qbk
@@ -220,4 +220,8 @@ C++11 support has resulted in some breaking changes:
for C++11 allocators.
* Simplified the implementation a bit. Hopefully more robust.
+[h2 Boost 1.53.0]
+
+* Remove support for the old pre-standard variadic pair constructors.
+
[endsect]
diff --git a/doc/ref.php b/doc/ref.php
index 2971b5df..b931cd08 100644
--- a/doc/ref.php
+++ b/doc/ref.php
@@ -449,10 +449,6 @@ EOL;
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -499,10 +495,6 @@ EOL;
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
diff --git a/doc/ref.xml b/doc/ref.xml
index 9cbe0316..6d55c8eb 100644
--- a/doc/ref.xml
+++ b/doc/ref.xml
@@ -383,10 +383,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -426,10 +422,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -1429,10 +1421,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -1472,10 +1460,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -2488,10 +2472,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -2531,10 +2511,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -3581,10 +3557,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
@@ -3624,10 +3596,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Since existing std::pair
implementations don't support
std::piecewise_construct
this emulates it,
but using boost::unordered::piecewise_construct
.
- In version of Boost before 1.48 this emulated the variadic pair
- constructor from older C++0x drafts. For backwards compatability
- this can be enabled by defining the macro
- BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
.
diff --git a/include/boost/unordered/detail/allocate.hpp b/include/boost/unordered/detail/allocate.hpp
index b6f1c796..42814d9f 100644
--- a/include/boost/unordered/detail/allocate.hpp
+++ b/include/boost/unordered/detail/allocate.hpp
@@ -930,28 +930,11 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::)
// The decision is made on the first argument.
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
- template
- struct emulation1 {
- static choice1::type test(choice1, std::pair const&);
- static choice2::type test(choice2, A const&);
- static choice3::type test(choice3, convert_from_anything const&);
-
- enum { value =
- sizeof(test(choose(), boost::unordered::detail::make())) ==
- sizeof(choice2::type) };
- };
-#endif
-
template
struct check3_base {
static choice1::type test(choice1,
boost::unordered::piecewise_construct_t);
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
- static choice2::type test(choice2, A const&);
-#endif
-
static choice3::type test(choice3, ...);
enum { value =
@@ -963,14 +946,6 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::)
enum { value = check3_base::value == sizeof(choice1::type) };
};
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
- template
- struct emulation3 {
- enum { value = check3_base::value == sizeof(choice2::type) };
- };
-
-#endif
-
// TODO: Full construct?
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
@@ -997,51 +972,6 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::)
boost::addressof(address->second), boost::forward(a2));
}
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-
- template
- inline typename enable_if, void>::type
- construct_value_impl(Alloc& alloc, std::pair* address,
- BOOST_FWD_REF(A0) a0)
- {
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->first),boost::forward(a0));
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->second));
- }
-
- template
- inline typename enable_if, void>::type
- construct_value_impl(Alloc& alloc, std::pair* address,
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
- {
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->first),boost::forward(a0));
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->second),
- boost::forward(a1),
- boost::forward(a2));
- }
-
- template
- inline void construct_value_impl(Alloc& alloc, std::pair* address,
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2,
- BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(Args)... args)
- {
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->first),boost::forward(a0));
- boost::unordered::detail::call_construct(alloc,
- boost::addressof(address->second),
- boost::forward(a1),
- boost::forward(a2),
- boost::forward(a3),
- boost::forward(args)...);
- }
-
-#endif // BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
#else // BOOST_NO_VARIADIC_TEMPLATES
////////////////////////////////////////////////////////////////////////////////
@@ -1107,58 +1037,6 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::)
boost::addressof(address->second), args.a2);
}
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-
- template
- inline void construct_value_impl(Alloc&, std::pair* address,
- boost::unordered::detail::emplace_args1 const& args,
- typename enable_if, void*>::type = 0)
- {
- new((void*) boost::addressof(address->first)) A(
- boost::forward(args.a0));
- new((void*) boost::addressof(address->second)) B();
- }
-
- template
- inline void construct_value_impl(Alloc&, std::pair* address,
- boost::unordered::detail::emplace_args3 const& args,
- typename enable_if, void*>::type = 0)
- {
- new((void*) boost::addressof(address->first)) A(
- boost::forward(args.a0));
- new((void*) boost::addressof(address->second)) B(
- boost::forward(args.a1),
- boost::forward(args.a2));
- }
-
-#define BOOST_UNORDERED_CONSTRUCT_PAIR_IMPL(z, num_params, _) \
- template \
- inline void construct_value_impl(Alloc&, std::pair* address, \
- boost::unordered::detail::BOOST_PP_CAT(emplace_args, num_params) < \
- BOOST_PP_ENUM_PARAMS_Z(z, num_params, A) \
- > const& args) \
- { \
- new((void*) boost::addressof(address->first)) A( \
- boost::forward(args.a0)); \
- new((void*) boost::addressof(address->second)) B( \
- BOOST_PP_ENUM_##z(BOOST_PP_DEC(num_params), \
- BOOST_UNORDERED_CALL_FORWARD2, args.a)); \
- }
-
-#define BOOST_UNORDERED_CALL_FORWARD2(z, i, a) \
- BOOST_UNORDERED_CALL_FORWARD(z, BOOST_PP_INC(i), a)
-
- BOOST_UNORDERED_CONSTRUCT_PAIR_IMPL(1, 2, _)
- BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT,
- BOOST_UNORDERED_CONSTRUCT_PAIR_IMPL, _)
-
-#undef BOOST_UNORDERED_CONSTRUCT_PAIR_IMPL
-#undef BOOST_UNORDERED_CALL_FORWARD2
-
-#endif // BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
#endif // BOOST_NO_VARIADIC_TEMPLATES
}}}
diff --git a/include/boost/unordered/detail/extract_key.hpp b/include/boost/unordered/detail/extract_key.hpp
index 66e039d0..8a89ce1d 100644
--- a/include/boost/unordered/detail/extract_key.hpp
+++ b/include/boost/unordered/detail/extract_key.hpp
@@ -93,11 +93,6 @@ namespace detail {
return v.first;
}
- static key_type const& extract(key_type const& v)
- {
- return v;
- }
-
template
static key_type const& extract(std::pair const& v)
{
@@ -111,14 +106,13 @@ namespace detail {
return v.first;
}
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
- template
- static key_type const& extract(key_type const& k,
- Arg1 const&, Args const&...)
+ template
+ static key_type const& extract(key_type const& k, Arg1 const&)
{
return k;
}
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
template
static no_key extract(Args const&...)
{
@@ -126,12 +120,6 @@ namespace detail {
}
#else
- template
- static key_type const& extract(key_type const& k, Arg1 const&)
- {
- return k;
- }
-
static no_key extract()
{
return no_key();
@@ -195,7 +183,6 @@ BOOST_UNORDERED_KEY_FROM_TUPLE(boost::)
BOOST_UNORDERED_KEY_FROM_TUPLE(std::)
#endif
-
static bool compare_mapped(value_type const& x, value_type const& y)
{
return x.second == y.second;
diff --git a/test/unordered/Jamfile.v2 b/test/unordered/Jamfile.v2
index 77206493..16044fe1 100644
--- a/test/unordered/Jamfile.v2
+++ b/test/unordered/Jamfile.v2
@@ -34,9 +34,6 @@ test-suite unordered
[ run move_tests.cpp ]
[ run assign_tests.cpp ]
[ run insert_tests.cpp ]
- [ run insert_tests.cpp : :
- : BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
- : insert_deprecated ]
[ run insert_stable_tests.cpp ]
[ run unnecessary_copy_tests.cpp ]
[ run erase_tests.cpp ]
diff --git a/test/unordered/insert_tests.cpp b/test/unordered/insert_tests.cpp
index 7208f54b..df0395fc 100644
--- a/test/unordered/insert_tests.cpp
+++ b/test/unordered/insert_tests.cpp
@@ -658,20 +658,6 @@ UNORDERED_AUTO_TEST(map_emplace_test)
x.emplace(2, 3);
BOOST_TEST(x.find(2) != x.end() &&
x.find(2)->second == overloaded_constructor(3));
-
-#if defined (BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
- x.emplace(1);
- BOOST_TEST(x.find(1) != x.end() &&
- x.find(1)->second == overloaded_constructor());
-
- x.emplace(4, 5, 6);
- BOOST_TEST(x.find(4) != x.end() &&
- x.find(4)->second == overloaded_constructor(5, 6));
-
- x.emplace(7, 8, 9, 10);
- BOOST_TEST(x.find(7) != x.end() &&
- x.find(7)->second == overloaded_constructor(8, 9, 10));
-#endif
}
UNORDERED_AUTO_TEST(set_emplace_test)