/
usr
/
include
/
boost
/
asio
/
impl
/
/usr/include/boost/asio/impl
mkdir
upload
Name
Size
Mode
Actions
awaitable.hpp
11748
0644
edit
dl
rm
buffered_read_stream.hpp
16925
0644
edit
dl
rm
buffered_write_stream.hpp
16429
0644
edit
dl
rm
compose.hpp
20461
0644
edit
dl
rm
connect.hpp
32234
0644
edit
dl
rm
co_spawn.hpp
8834
0644
edit
dl
rm
defer.hpp
7803
0644
edit
dl
rm
detached.hpp
3374
0644
edit
dl
rm
dispatch.hpp
7567
0644
edit
dl
rm
error.ipp
3070
0644
edit
dl
rm
execution_context.hpp
3247
0644
edit
dl
rm
execution_context.ipp
1801
0644
edit
dl
rm
executor.hpp
6835
0644
edit
dl
rm
executor.ipp
1002
0644
edit
dl
rm
handler_alloc_hook.ipp
1984
0644
edit
dl
rm
io_context.hpp
13728
0644
edit
dl
rm
io_context.ipp
4108
0644
edit
dl
rm
multiple_exceptions.ipp
1280
0644
edit
dl
rm
post.hpp
7762
0644
edit
dl
rm
read.hpp
45178
0644
edit
dl
rm
read_at.hpp
28331
0644
edit
dl
rm
read_until.hpp
115335
0644
edit
dl
rm
redirect_error.hpp
12015
0644
edit
dl
rm
serial_port_base.hpp
1375
0644
edit
dl
rm
serial_port_base.ipp
13327
0644
edit
dl
rm
spawn.hpp
15854
0644
edit
dl
rm
src.hpp
3833
0644
edit
dl
rm
system_context.hpp
875
0644
edit
dl
rm
system_context.ipp
2109
0644
edit
dl
rm
system_executor.hpp
6391
0644
edit
dl
rm
thread_pool.hpp
10853
0644
edit
dl
rm
thread_pool.ipp
3132
0644
edit
dl
rm
use_awaitable.hpp
7244
0644
edit
dl
rm
use_future.hpp
27610
0644
edit
dl
rm
write.hpp
41076
0644
edit
dl
rm
write_at.hpp
24732
0644
edit
dl
rm
Edit:
/usr/include/boost/asio/impl/execution_context.hpp
(3247B)
// // impl/execution_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP #define BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/handler_type_requirements.hpp> #include <boost/asio/detail/scoped_ptr.hpp> #include <boost/asio/detail/service_registry.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { #if !defined(GENERATING_DOCUMENTATION) template <typename Service> inline Service& use_service(execution_context& e) { // Check that Service meets the necessary type requirements. (void)static_cast<execution_context::service*>(static_cast<Service*>(0)); return e.service_registry_->template use_service<Service>(); } #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service, typename... Args> Service& make_service(execution_context& e, BOOST_ASIO_MOVE_ARG(Args)... args) { detail::scoped_ptr<Service> svc( new Service(e, BOOST_ASIO_MOVE_CAST(Args)(args)...)); e.service_registry_->template add_service<Service>(svc.get()); Service& result = *svc; svc.release(); return result; } #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service> Service& make_service(execution_context& e) { detail::scoped_ptr<Service> svc(new Service(e)); e.service_registry_->template add_service<Service>(svc.get()); Service& result = *svc; svc.release(); return result; } #define BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \ template <typename Service, BOOST_ASIO_VARIADIC_TPARAMS(n)> \ Service& make_service(execution_context& e, \ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \ { \ detail::scoped_ptr<Service> svc( \ new Service(e, BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \ e.service_registry_->template add_service<Service>(svc.get()); \ Service& result = *svc; \ svc.release(); \ return result; \ } \ /**/ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF) #undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service> inline void add_service(execution_context& e, Service* svc) { // Check that Service meets the necessary type requirements. (void)static_cast<execution_context::service*>(static_cast<Service*>(0)); e.service_registry_->template add_service<Service>(svc); } template <typename Service> inline bool has_service(execution_context& e) { // Check that Service meets the necessary type requirements. (void)static_cast<execution_context::service*>(static_cast<Service*>(0)); return e.service_registry_->template has_service<Service>(); } #endif // !defined(GENERATING_DOCUMENTATION) inline execution_context& execution_context::service::context() { return owner_; } } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // BOOST_ASIO_IMPL_EXECUTION_CONTEXT_HPP
Save
cmd:
run