From 4471e056f4496629cc1462cf2d5aac5029b6f0fe Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 11 Oct 2011 08:36:23 +0000 Subject: [PATCH] Unordered: Avoid passing UDTs through `...`. [SVN r74913] --- include/boost/unordered/detail/allocator_helpers.hpp | 3 ++- include/boost/unordered/detail/emplace_args.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/allocator_helpers.hpp b/include/boost/unordered/detail/allocator_helpers.hpp index 457ddcb4..216eeaef 100644 --- a/include/boost/unordered/detail/allocator_helpers.hpp +++ b/include/boost/unordered/detail/allocator_helpers.hpp @@ -104,7 +104,8 @@ namespace boost { namespace unordered { namespace detail { yes_type is_private_type(private_type const&); struct convert_from_anything { - convert_from_anything(...); + template + convert_from_anything(T const&); }; #if !defined(BOOST_NO_SFINAE_EXPR) || BOOST_WORKAROUND(BOOST_MSVC, >= 1500) diff --git a/include/boost/unordered/detail/emplace_args.hpp b/include/boost/unordered/detail/emplace_args.hpp index 9e2ee64e..a4365c21 100644 --- a/include/boost/unordered/detail/emplace_args.hpp +++ b/include/boost/unordered/detail/emplace_args.hpp @@ -225,7 +225,7 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, std::tr1) struct emulation1 { static choice1::type test(choice1, std::pair const&); static choice2::type test(choice2, A const&); - static choice3::type test(choice3, ...); + static choice3::type test(choice3, convert_from_anything const&); enum { value = sizeof(test(choose(), boost::unordered::detail::make())) ==