mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user