~ubuntu-branches/ubuntu/wily/davix/wily

« back to all changes in this revision

Viewing changes to deps/boost_intern/src/thread/test/test_6174.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2015-07-31 13:17:55 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20150731131755-mizprbmn7ogv33te
Tags: 0.4.1-1
* Update to version 0.4.1
* Implement Multi-Arch support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright (C) 2010 Vicente Botet
2
 
//
3
 
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
4
 
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
 
 
6
 
 
7
 
#define BOOST_THREAD_VERSION 3
8
 
 
9
 
#include <boost/thread/thread_only.hpp>
10
 
#include <boost/thread/future.hpp>
11
 
#include <boost/config.hpp>
12
 
 
13
 
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
14
 
struct MovableButNonCopyable {
15
 
#if ! defined BOOST_NO_CXX11_DELETED_FUNCTIONS
16
 
      MovableButNonCopyable(MovableButNonCopyable const&) = delete;
17
 
      MovableButNonCopyable& operator=(MovableButNonCopyable const&) = delete;
18
 
#else
19
 
private:
20
 
    MovableButNonCopyable(MovableButNonCopyable const&);
21
 
    MovableButNonCopyable& operator=(MovableButNonCopyable const&);
22
 
#endif
23
 
public:
24
 
    MovableButNonCopyable() {};
25
 
    MovableButNonCopyable(MovableButNonCopyable&&) {};
26
 
    MovableButNonCopyable& operator=(MovableButNonCopyable&&)
27
 
    {
28
 
      return *this;
29
 
    };
30
 
};
31
 
 
32
 
MovableButNonCopyable construct()
33
 
{
34
 
  return MovableButNonCopyable();
35
 
}
36
 
 
37
 
int main()
38
 
{
39
 
    boost::packaged_task<MovableButNonCopyable> pt(construct);
40
 
    pt();
41
 
    return 0;
42
 
}
43
 
#else
44
 
int main()
45
 
{
46
 
    return 0;
47
 
}
48
 
#endif