]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/experimental/detached.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / asio / experimental / detached.hpp
1 //
2 // experimental/detached.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10
11 #ifndef BOOST_ASIO_EXPERIMENTAL_DETACHED_HPP
12 #define BOOST_ASIO_EXPERIMENTAL_DETACHED_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19 #include <memory>
20
21 #include <boost/asio/detail/push_options.hpp>
22
23 namespace boost {
24 namespace asio {
25 namespace experimental {
26
27 /// Class used to specify that an asynchronous operation is detached.
28 /**
29
30 * The detached_t class is used to indicate that an asynchronous operation is
31 * detached. That is, there is no completion handler waiting for the
32 * operation's result. A detached_t object may be passed as a handler to an
33 * asynchronous operation, typically using the special value
34 * @c boost::asio::experimental::detached. For example:
35
36 * @code my_socket.async_send(my_buffer, boost::asio::experimental::detached);
37 * @endcode
38 */
39 class detached_t
40 {
41 public:
42 /// Constructor.
43 BOOST_ASIO_CONSTEXPR detached_t()
44 {
45 }
46 };
47
48 /// A special value, similar to std::nothrow.
49 /**
50 * See the documentation for boost::asio::experimental::detached_t for a usage
51 * example.
52 */
53 #if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
54 constexpr detached_t detached;
55 #elif defined(BOOST_ASIO_MSVC)
56 __declspec(selectany) detached_t detached;
57 #endif
58
59 } // namespace experimental
60 } // namespace asio
61 } // namespace boost
62
63 #include <boost/asio/detail/pop_options.hpp>
64
65 #include <boost/asio/experimental/impl/detached.hpp>
66
67 #endif // BOOST_ASIO_EXPERIMENTAL_DETACHED_HPP