2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-23 18:12:12 +00:00
Files
thread/test/test_6174.cpp
Vicente J. Botet Escriba c4420d7591 Thread: merge fix for #6174
[SVN r80040]
2012-08-15 09:54:21 +00:00

47 lines
1.0 KiB
C++

// Copyright (C) 2010 Vicente Botet
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/thread.hpp>
#include <boost/config.hpp>
#ifndef BOOST_NO_RVALUE_REFERENCES
struct MovableButNonCopyable {
#if ! defined BOOST_NO_DELETED_FUNCTIONS
MovableButNonCopyable(MovableButNonCopyable const&) = delete;
MovableButNonCopyable& operator=(MovableButNonCopyable const&) = delete;
#else
private:
MovableButNonCopyable(MovableButNonCopyable const&);
MovableButNonCopyable& operator=(MovableButNonCopyable const&);
#endif
public:
MovableButNonCopyable() {};
MovableButNonCopyable(MovableButNonCopyable&&) {};
MovableButNonCopyable& operator=(MovableButNonCopyable&&)
{
return *this;
};
};
MovableButNonCopyable construct()
{
return MovableButNonCopyable();
}
int main()
{
boost::packaged_task<MovableButNonCopyable> pt(construct);
pt();
return 0;
}
#else
int main()
{
return 0;
}
#endif