Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.5KB

  1. //
  2. // detached.hpp
  3. // ~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 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. #ifndef ASIO_DETACHED_HPP
  11. #define ASIO_DETACHED_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include <memory>
  17. #include "asio/detail/push_options.hpp"
  18. namespace asio {
  19. /// Class used to specify that an asynchronous operation is detached.
  20. /**
  21. * The detached_t class is used to indicate that an asynchronous operation is
  22. * detached. That is, there is no completion handler waiting for the
  23. * operation's result. A detached_t object may be passed as a handler to an
  24. * asynchronous operation, typically using the special value
  25. * @c asio::detached. For example:
  26. * @code my_socket.async_send(my_buffer, asio::detached);
  27. * @endcode
  28. */
  29. class detached_t
  30. {
  31. public:
  32. /// Constructor.
  33. ASIO_CONSTEXPR detached_t()
  34. {
  35. }
  36. };
  37. /// A special value, similar to std::nothrow.
  38. /**
  39. * See the documentation for asio::detached_t for a usage example.
  40. */
  41. #if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
  42. constexpr detached_t detached;
  43. #elif defined(ASIO_MSVC)
  44. __declspec(selectany) detached_t detached;
  45. #endif
  46. } // namespace asio
  47. #include "asio/detail/pop_options.hpp"
  48. #include "asio/impl/detached.hpp"
  49. #endif // ASIO_DETACHED_HPP