Unordered: Use Boost.Move in minimal tests.

[SVN r73828]
This commit is contained in:
Daniel James
2011-08-16 22:17:11 +00:00
parent a8fdf19c91
commit 11e390bf42
4 changed files with 230 additions and 48 deletions

View File

@@ -11,6 +11,8 @@
#define BOOST_UNORDERED_OBJECTS_MINIMAL_HEADER
#include <cstddef>
#include <boost/move/move.hpp>
#include <utility>
#if defined(BOOST_MSVC)
#pragma warning(push)
@@ -135,6 +137,38 @@ namespace minimal
//ampersand_operator_used operator&() const { return ampersand_operator_used(); }
};
struct movable_init {};
class movable1
{
BOOST_MOVABLE_BUT_NOT_COPYABLE(movable1)
public:
movable1(constructor_param const&) {}
movable1() {}
explicit movable1(movable_init) {}
movable1(BOOST_RV_REF(movable1)) {}
movable1& operator=(BOOST_RV_REF(movable1));
~movable1() {}
};
#if !defined(BOOST_NO_RVALUE_REFERENCES)
class movable2
{
public:
movable2(constructor_param const&) {}
explicit movable2(movable_init) {}
movable2(movable2&&) {}
~movable2() {}
private:
movable2() {}
movable2(movable2 const&);
movable2& operator=(movable2 const&);
};
#else
typedef movable1 movable2;
#endif
template <class T>
class hash
{