diff options
Diffstat (limited to 'boost/asio/impl/execution_context.hpp')
-rw-r--r-- | boost/asio/impl/execution_context.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/boost/asio/impl/execution_context.hpp b/boost/asio/impl/execution_context.hpp index eadf36b145..a1617f8c9c 100644 --- a/boost/asio/impl/execution_context.hpp +++ b/boost/asio/impl/execution_context.hpp @@ -2,7 +2,7 @@ // impl/execution_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2019 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) @@ -24,6 +24,8 @@ namespace boost { namespace asio { +#if !defined(GENERATING_DOCUMENTATION) + template <typename Service> inline Service& use_service(execution_context& e) { @@ -33,8 +35,7 @@ inline Service& use_service(execution_context& e) return e.service_registry_->template use_service<Service>(); } -#if !defined(GENERATING_DOCUMENTATION) -# if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) +#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service, typename... Args> Service& make_service(execution_context& e, BOOST_ASIO_MOVE_ARG(Args)... args) @@ -47,7 +48,7 @@ Service& make_service(execution_context& e, BOOST_ASIO_MOVE_ARG(Args)... args) return result; } -# else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) +#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service> Service& make_service(execution_context& e) @@ -75,8 +76,7 @@ Service& make_service(execution_context& e) BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF) #undef BOOST_ASIO_PRIVATE_MAKE_SERVICE_DEF -# endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) -#endif // !defined(GENERATING_DOCUMENTATION) +#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template <typename Service> inline void add_service(execution_context& e, Service* svc) @@ -96,6 +96,8 @@ inline bool has_service(execution_context& e) return e.service_registry_->template has_service<Service>(); } +#endif // !defined(GENERATING_DOCUMENTATION) + inline execution_context& execution_context::service::context() { return owner_; |