forked from boostorg/unordered
Unordered: Fix unnecessary_copy_tests + extra tests.
It looks the odd result in unnecessary_copy_tests on Visual C++ 11 is not a bug, but add some extra tests just to make sure. Also some extra rehash and reserve testing thrown in. [SVN r80705]
This commit is contained in:
@@ -374,7 +374,16 @@ namespace unnecessary_copy_tests
|
||||
// COPY_COUNT(1) would be okay here.
|
||||
reset();
|
||||
x.emplace();
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, >= 1800)
|
||||
// This is a little odd, Visual C++ 11 seems to move the pair, which
|
||||
// results in one copy (for the const key) and one move (for the
|
||||
// non-const mapped value). Since 'emplace(boost::move(a))' (see below)
|
||||
// has the normal result, it must be some odd consequence of how
|
||||
// Visual C++ 11 handles calling move for default arguments.
|
||||
COPY_COUNT(3); MOVE_COUNT(1);
|
||||
# else
|
||||
COPY_COUNT(2); MOVE_COUNT(0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
reset();
|
||||
|
||||
Reference in New Issue
Block a user