#include <memory>
#include <vector>

//-----------------------------------------------------------------------------
class one
{
public:
    one(){}
	one(one&& other) : x(std::move(other.x)) {}
	one& operator=(one&& other){ x = std::move(other.x); return *this; }

	void swap(const one& other){ x.swap(other.x); }
	void swap(one&& other){ x.swap(std::move(other.x)); }

private:
	one(const one&);
	one& operator=(const one&);

	std::unique_ptr<int> x;
};

//-----------------------------------------------------------------------------
void swap(one& left, one& right)
{
	left.swap(right);
}

//-----------------------------------------------------------------------------
void swap(one&& left, one& right)
{
	right.swap(std::move(left));
}

//-----------------------------------------------------------------------------
void swap(one& left, one&& right)
{
	left.swap(std::move(right));
}

//-----------------------------------------------------------------------------
class two
{
public:
	two(){}
	two(two&&){}
	two& operator=(two&&){ return *this; }

	operator one(){return one();}

private:
	two(const two&);
	two& operator=(const two&);
};

//-----------------------------------------------------------------------------
int main()
{
	std::vector<two> twos(10);
	std::vector<one> ones(std::make_move_iterator(twos.begin()), std::make_move_iterator(twos.end()));
}