Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:47

0001 //
0002 // detail/winrt_async_op.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 
0011 #ifndef BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_HPP
0012 #define BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_HPP
0013 
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
0017 
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/detail/operation.hpp>
0020 
0021 #include <boost/asio/detail/push_options.hpp>
0022 
0023 namespace boost {
0024 namespace asio {
0025 namespace detail {
0026 
0027 template <typename TResult>
0028 class winrt_async_op
0029   : public operation
0030 {
0031 public:
0032   // The error code to be passed to the completion handler.
0033   boost::system::error_code ec_;
0034 
0035   // The result of the operation, to be passed to the completion handler.
0036   TResult result_;
0037 
0038 protected:
0039   winrt_async_op(func_type complete_func)
0040     : operation(complete_func),
0041       result_()
0042   {
0043   }
0044 };
0045 
0046 template <>
0047 class winrt_async_op<void>
0048   : public operation
0049 {
0050 public:
0051   // The error code to be passed to the completion handler.
0052   boost::system::error_code ec_;
0053 
0054 protected:
0055   winrt_async_op(func_type complete_func)
0056     : operation(complete_func)
0057   {
0058   }
0059 };
0060 
0061 } // namespace detail
0062 } // namespace asio
0063 } // namespace boost
0064 
0065 #include <boost/asio/detail/pop_options.hpp>
0066 
0067 #endif // BOOST_ASIO_DETAIL_WINRT_ASYNC_OP_HPP