From 4a066e4b18249e5ba0238b107de746058cea4254 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 14 Jul 2012 16:45:54 +0000 Subject: [PATCH] Unordered: Fix unnecessary_copy_tests for MSVC10 Compilers with rvalue references can avoid creating a node, as they can use the value from the rvalue reference to check if the value is already in the container (in this case it is) before creating the node. Could possibly do the same for compilers without rvalue references, if it can get a value out of Boost.Move's rvalue reference emulation. [SVN r79503] --- test/unordered/unnecessary_copy_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unordered/unnecessary_copy_tests.cpp b/test/unordered/unnecessary_copy_tests.cpp index 6e9961cc..29ca4282 100644 --- a/test/unordered/unnecessary_copy_tests.cpp +++ b/test/unordered/unnecessary_copy_tests.cpp @@ -245,7 +245,8 @@ namespace unnecessary_copy_tests // the existing element. reset(); x.emplace(); -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_VARIADIC_TEMPLATES) || \ + !defined(BOOST_NO_RVALUE_REFERENCES) // source_cost doesn't make much sense here, but it seems to fit. COPY_COUNT(1); MOVE_COUNT(source_cost); #else