Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/thread/detail/delete.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 // Copyright (C) 2012 Vicente J. Botet Escriba | |
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 #ifndef BOOST_THREAD_DETAIL_DELETE_HPP | |
7 #define BOOST_THREAD_DETAIL_DELETE_HPP | |
8 | |
9 #include <boost/config.hpp> | |
10 | |
11 /** | |
12 * BOOST_THREAD_DELETE_COPY_CTOR deletes the copy constructor when the compiler supports it or | |
13 * makes it private. | |
14 * | |
15 * BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or | |
16 * makes it private. | |
17 */ | |
18 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS | |
19 #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ | |
20 CLASS(CLASS const&) = delete; \ | |
21 | |
22 #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ | |
23 CLASS& operator=(CLASS const&) = delete; | |
24 | |
25 #else // BOOST_NO_CXX11_DELETED_FUNCTIONS | |
26 #if defined(BOOST_MSVC) && _MSC_VER >= 1600 | |
27 #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ | |
28 private: \ | |
29 CLASS(CLASS const&); \ | |
30 public: | |
31 | |
32 #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ | |
33 private: \ | |
34 CLASS& operator=(CLASS const&); \ | |
35 public: | |
36 #else | |
37 #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ | |
38 private: \ | |
39 CLASS(CLASS&); \ | |
40 public: | |
41 | |
42 #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ | |
43 private: \ | |
44 CLASS& operator=(CLASS&); \ | |
45 public: | |
46 #endif | |
47 #endif // BOOST_NO_CXX11_DELETED_FUNCTIONS | |
48 | |
49 /** | |
50 * BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or | |
51 * makes them private. | |
52 */ | |
53 #define BOOST_THREAD_NO_COPYABLE(CLASS) \ | |
54 BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ | |
55 BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) | |
56 | |
57 #endif // BOOST_THREAD_DETAIL_DELETE_HPP |