diff --git a/include/boost/unordered/detail/fwd.hpp b/include/boost/unordered/detail/fwd.hpp index 8ab4cfdf..6da61cd7 100644 --- a/include/boost/unordered/detail/fwd.hpp +++ b/include/boost/unordered/detail/fwd.hpp @@ -35,39 +35,6 @@ #endif #endif -// BOOST_UNORDERED_TUPLE_ARGS -// -// Maximum number of std::tuple members to support, or 0 if std::tuple -// isn't avaiable. More are supported when full C++11 is used. - -// Already defined, so do nothing -#if defined(BOOST_UNORDERED_TUPLE_ARGS) - -// Assume if we have C++11 tuple it's properly variadic, -// and just use a max number of 10 arguments. -#elif !defined(BOOST_NO_CXX11_HDR_TUPLE) -#define BOOST_UNORDERED_TUPLE_ARGS 10 - -// Visual C++ has a decent enough tuple for piecewise construction, -// so use that if available, using _VARIADIC_MAX for the maximum -// number of parameters. Note that this comes after the check -// for a full C++11 tuple. -#elif defined(BOOST_MSVC) -#if !BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT -#define BOOST_UNORDERED_TUPLE_ARGS 0 -#elif defined(_VARIADIC_MAX) -#define BOOST_UNORDERED_TUPLE_ARGS _VARIADIC_MAX -#else -#define BOOST_UNORDERED_TUPLE_ARGS 5 -#endif - -// Assume that we don't have std::tuple -#else -#define BOOST_UNORDERED_TUPLE_ARGS 0 -#endif - -#if BOOST_UNORDERED_TUPLE_ARGS #include -#endif #endif diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 3a9c66b6..61d3f31b 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -645,8 +645,7 @@ namespace boost { template struct use_piecewise { - static choice1::type test( - choice1, std::piecewise_construct_t); + static choice1::type test(choice1, std::piecewise_construct_t); static choice2::type test(choice2, ...); @@ -2205,9 +2204,9 @@ namespace boost { return emplace_return(iterator(p, itb), false); } - node_tmp b(boost::unordered::detail::func::construct_node_pair( - this->node_alloc(), std::forward(k), - std::forward(obj)), + node_tmp b( + boost::unordered::detail::func::construct_node_pair( + this->node_alloc(), std::forward(k), std::forward(obj)), node_alloc()); if (size_ + 1 > max_load_) { @@ -3076,47 +3075,23 @@ namespace boost { } #endif -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - #define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \ template \ - static no_key extract(std::piecewise_construct_t, \ - namespace_ tuple<> const&, T2 const&) \ + static no_key extract( \ + std::piecewise_construct_t, namespace_ tuple<> const&, T2 const&) \ { \ return no_key(); \ } \ \ template \ static typename is_key::type extract( \ - std::piecewise_construct_t, namespace_ tuple const& k, \ - T2 const&) \ + std::piecewise_construct_t, namespace_ tuple const& k, T2 const&) \ { \ return typename is_key::type(namespace_ get<0>(k)); \ } -#else - -#define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \ - static no_key extract( \ - std::piecewise_construct_t, namespace_ tuple<> const&) \ - { \ - return no_key(); \ - } \ - \ - template \ - static typename is_key::type extract( \ - std::piecewise_construct_t, namespace_ tuple const& k) \ - { \ - return typename is_key::type(namespace_ get<0>(k)); \ - } - -#endif - BOOST_UNORDERED_KEY_FROM_TUPLE(boost::) - -#if BOOST_UNORDERED_TUPLE_ARGS BOOST_UNORDERED_KEY_FROM_TUPLE(std::) -#endif #undef BOOST_UNORDERED_KEY_FROM_TUPLE }; diff --git a/test/unordered/unnecessary_copy_tests.cpp b/test/unordered/unnecessary_copy_tests.cpp index d1139f26..82a93714 100644 --- a/test/unordered/unnecessary_copy_tests.cpp +++ b/test/unordered/unnecessary_copy_tests.cpp @@ -542,8 +542,6 @@ namespace unnecessary_copy_tests { COPY_COUNT(0); MOVE_COUNT(0); -#if BOOST_UNORDERED_TUPLE_ARGS - reset(); x.emplace(std::piecewise_construct, std::make_tuple(std::ref(b.first)), std::make_tuple(std::ref(b.second))); @@ -573,8 +571,6 @@ namespace unnecessary_copy_tests { std::forward_as_tuple(b.first), std::forward_as_tuple(b.second)); COPY_COUNT(0); MOVE_COUNT(0); -#endif - #endif } }