forked from boostorg/unordered
Unordered: Small improvements for windows.
[SVN r73760]
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
namespace assign_tests {
|
||||
|
||||
test::seed_t seed(96785);
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
#include "../helpers/equivalent.hpp"
|
||||
#include "../helpers/invariants.hpp"
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
namespace move_tests
|
||||
{
|
||||
test::seed_t seed(98624);
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
#include "../helpers/tracker.hpp"
|
||||
#include "../helpers/invariants.hpp"
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
namespace swap_tests
|
||||
{
|
||||
|
||||
|
||||
@@ -38,14 +38,21 @@ namespace unnecessary_copy_tests
|
||||
x.tag_ = -1; ++moves;
|
||||
}
|
||||
|
||||
int tag_;
|
||||
private:
|
||||
// I think the standard might require assignment (or move
|
||||
// assignment) for some operations. That Boost.Unordered doesn't
|
||||
// is an implementation detail. But these tests are very specific
|
||||
// to the implementation, so it's probably okay that this doesn't
|
||||
// meet the standard requirements.
|
||||
count_copies& operator=(count_copies const&);
|
||||
count_copies& operator=(BOOST_COPY_ASSIGN_REF(count_copies) p) // Copy assignment
|
||||
{
|
||||
tag_ = p.tag_;
|
||||
++copies;
|
||||
return *this;
|
||||
}
|
||||
|
||||
count_copies& operator=(BOOST_RV_REF(count_copies) p) //Move assignment
|
||||
{
|
||||
tag_ = p.tag_;
|
||||
++moves;
|
||||
return *this;
|
||||
}
|
||||
|
||||
int tag_;
|
||||
};
|
||||
|
||||
bool operator==(count_copies const& x, count_copies const& y) {
|
||||
|
||||
Reference in New Issue
Block a user