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]
This commit is contained in:
Daniel James
2012-07-14 16:45:54 +00:00
parent 0fccd93e29
commit 4a066e4b18

View File

@ -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