service_base.hpp 850 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/beast
  8. //
  9. #ifndef BOOST_BEAST_DETAIL_SERVICE_BASE_HPP
  10. #define BOOST_BEAST_DETAIL_SERVICE_BASE_HPP
  11. #include <boost/asio/execution_context.hpp>
  12. namespace boost {
  13. namespace beast {
  14. namespace detail {
  15. template<class T>
  16. struct service_base : net::execution_context::service
  17. {
  18. static net::execution_context::id const id;
  19. explicit
  20. service_base(net::execution_context& ctx)
  21. : net::execution_context::service(ctx)
  22. {
  23. }
  24. };
  25. template<class T>
  26. net::execution_context::id const service_base<T>::id;
  27. } // detail
  28. } // beast
  29. } // boost
  30. #endif