$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r81384 - in trunk: boost/unordered/detail libs/unordered/doc libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2012-11-17 05:28:37
Author: danieljames
Date: 2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
New Revision: 81384
URL: http://svn.boost.org/trac/boost/changeset/81384
Log:
Unordered: Remove deprecated variadic pair constructors.
This was emulating them as specified in older standard drafts.
Text files modified: 
   trunk/boost/unordered/detail/allocate.hpp            |   122 ----------------------------------------
   trunk/boost/unordered/detail/extract_key.hpp         |    19 -----                                   
   trunk/libs/unordered/doc/changes.qbk                 |     4 +                                       
   trunk/libs/unordered/doc/ref.php                     |     8 --                                      
   trunk/libs/unordered/doc/ref.xml                     |    32 ----------                              
   trunk/libs/unordered/test/unordered/Jamfile.v2       |     3                                         
   trunk/libs/unordered/test/unordered/insert_tests.cpp |    14 ----                                    
   7 files changed, 7 insertions(+), 195 deletions(-)
Modified: trunk/boost/unordered/detail/allocate.hpp
==============================================================================
--- trunk/boost/unordered/detail/allocate.hpp	(original)
+++ trunk/boost/unordered/detail/allocate.hpp	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -930,28 +930,11 @@
     // The decision is made on the first argument.
 
 
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-    template <typename A, typename B, typename A0>
-    struct emulation1 {
-        static choice1::type test(choice1, std::pair<A, B> 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<A0>())) ==
-                sizeof(choice2::type) };
-    };
-#endif
-
     template <typename A, typename B, typename A0>
     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 @@
         enum { value = check3_base<A,B,A0>::value == sizeof(choice1::type) };
     };
 
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-    template <typename A, typename B, typename A0>
-    struct emulation3 {
-        enum { value = check3_base<A,B,A0>::value == sizeof(choice2::type) };
-    };
-
-#endif
-
 // TODO: Full construct?
 #if !defined(BOOST_NO_VARIADIC_TEMPLATES)
 
@@ -997,51 +972,6 @@
             boost::addressof(address->second), boost::forward<A2>(a2));
     }
 
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-
-    template <typename Alloc, typename A, typename B, typename A0>
-    inline typename enable_if<emulation1<A, B, A0>, void>::type
-        construct_value_impl(Alloc& alloc, std::pair<A, B>* address,
-            BOOST_FWD_REF(A0) a0)
-    {
-        boost::unordered::detail::call_construct(alloc,
-            boost::addressof(address->first),boost::forward<A0>(a0));
-        boost::unordered::detail::call_construct(alloc,
-            boost::addressof(address->second));
-   }
-
-    template <typename Alloc, typename A, typename B,
-        typename A0, typename A1, typename A2>
-    inline typename enable_if<emulation3<A, B, A0>, void>::type
-        construct_value_impl(Alloc& alloc, std::pair<A, B>* 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>(a0));
-        boost::unordered::detail::call_construct(alloc,
-            boost::addressof(address->second),
-            boost::forward<A1>(a1),
-            boost::forward<A2>(a2));
-    }
-
-    template <typename Alloc, typename A, typename B,
-            typename A0, typename A1, typename A2, typename A3,
-            typename... Args>
-    inline void construct_value_impl(Alloc& alloc, std::pair<A, B>* 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>(a0));
-        boost::unordered::detail::call_construct(alloc,
-            boost::addressof(address->second),
-            boost::forward<A1>(a1),
-            boost::forward<A2>(a2),
-            boost::forward<A3>(a3),
-            boost::forward<Args>(args)...);
-    }
-
-#endif // BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
 #else // BOOST_NO_VARIADIC_TEMPLATES
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1107,58 +1037,6 @@
             boost::addressof(address->second), args.a2);
     }
 
-#if defined(BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT)
-
-    template <typename Alloc, typename A, typename B, typename A0>
-    inline void construct_value_impl(Alloc&, std::pair<A, B>* address,
-            boost::unordered::detail::emplace_args1<A0> const& args,
-            typename enable_if<emulation1<A, B, A0>, void*>::type = 0)
-    {
-        new((void*) boost::addressof(address->first)) A(
-            boost::forward<A0>(args.a0));
-        new((void*) boost::addressof(address->second)) B();
-    }
-
-    template <typename Alloc, typename A, typename B,
-        typename A0, typename A1, typename A2>
-    inline void construct_value_impl(Alloc&, std::pair<A, B>* address,
-            boost::unordered::detail::emplace_args3<A0, A1, A2> const& args,
-            typename enable_if<emulation3<A, B, A0>, void*>::type = 0)
-    {
-        new((void*) boost::addressof(address->first)) A(
-            boost::forward<A0>(args.a0));
-        new((void*) boost::addressof(address->second)) B(
-            boost::forward<A1>(args.a1),
-            boost::forward<A2>(args.a2));
-    }
-
-#define BOOST_UNORDERED_CONSTRUCT_PAIR_IMPL(z, num_params, _)               \
-    template <typename Alloc, typename A, typename B,                       \
-        BOOST_PP_ENUM_PARAMS_Z(z, num_params, typename A)                   \
-    >                                                                       \
-    inline void construct_value_impl(Alloc&, std::pair<A, B>* 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<A0>(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
 
 }}}
Modified: trunk/boost/unordered/detail/extract_key.hpp
==============================================================================
--- trunk/boost/unordered/detail/extract_key.hpp	(original)
+++ trunk/boost/unordered/detail/extract_key.hpp	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -93,11 +93,6 @@
             return v.first;
         }
             
-        static key_type const& extract(key_type const& v)
-        {
-            return v;
-        }
-
         template <class Second>
         static key_type const& extract(std::pair<key_type, Second> const& v)
         {
@@ -111,14 +106,13 @@
             return v.first;
         }
 
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
-        template <class Arg1, class... Args>
-        static key_type const& extract(key_type const& k,
-            Arg1 const&, Args const&...)
+        template <class Arg1>
+        static key_type const& extract(key_type const& k, Arg1 const&)
         {
             return k;
         }
 
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
         template <class... Args>
         static no_key extract(Args const&...)
         {
@@ -126,12 +120,6 @@
         }
 #else
 
-        template <class Arg1>
-        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(std::)
 #endif
 
-
         static bool compare_mapped(value_type const& x, value_type const& y)
         {
             return x.second == y.second;
Modified: trunk/libs/unordered/doc/changes.qbk
==============================================================================
--- trunk/libs/unordered/doc/changes.qbk	(original)
+++ trunk/libs/unordered/doc/changes.qbk	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -220,4 +220,8 @@
   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]
Modified: trunk/libs/unordered/doc/ref.php
==============================================================================
--- trunk/libs/unordered/doc/ref.php	(original)
+++ trunk/libs/unordered/doc/ref.php	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -449,10 +449,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="emplace_hint">
@@ -499,10 +495,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="insert">
Modified: trunk/libs/unordered/doc/ref.xml
==============================================================================
--- trunk/libs/unordered/doc/ref.xml	(original)
+++ trunk/libs/unordered/doc/ref.xml	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -383,10 +383,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="emplace_hint">
@@ -426,10 +422,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="insert">
@@ -1429,10 +1421,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="emplace_hint">
@@ -1472,10 +1460,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="insert">
@@ -2488,10 +2472,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="emplace_hint">
@@ -2531,10 +2511,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="insert">
@@ -3581,10 +3557,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="emplace_hint">
@@ -3624,10 +3596,6 @@
                 <para>Since existing <code>std::pair</code> implementations don't support
                       <code>std::piecewise_construct</code> this emulates it,
                       but using <code>boost::unordered::piecewise_construct</code>.</para>
-                <para>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
-                      <code>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT</code>.</para>
               </notes>
             </method>
             <method name="insert">
Modified: trunk/libs/unordered/test/unordered/Jamfile.v2
==============================================================================
--- trunk/libs/unordered/test/unordered/Jamfile.v2	(original)
+++ trunk/libs/unordered/test/unordered/Jamfile.v2	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -34,9 +34,6 @@
         [ run move_tests.cpp ]
         [ run assign_tests.cpp ]
         [ run insert_tests.cpp ]
-        [ run insert_tests.cpp : :
-            : <define>BOOST_UNORDERED_DEPRECATED_PAIR_CONSTRUCT
-            : insert_deprecated ]
         [ run insert_stable_tests.cpp ]
         [ run unnecessary_copy_tests.cpp ]
         [ run erase_tests.cpp ]
Modified: trunk/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_tests.cpp	(original)
+++ trunk/libs/unordered/test/unordered/insert_tests.cpp	2012-11-17 05:28:35 EST (Sat, 17 Nov 2012)
@@ -658,20 +658,6 @@
     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)