any_connection.ipp 815 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 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. #ifndef BOOST_MYSQL_IMPL_ANY_CONNECTION_IPP
  8. #define BOOST_MYSQL_IMPL_ANY_CONNECTION_IPP
  9. #pragma once
  10. #include <boost/mysql/any_connection.hpp>
  11. #include <boost/mysql/detail/engine.hpp>
  12. #include <boost/mysql/detail/engine_impl.hpp>
  13. #include <boost/mysql/impl/internal/variant_stream.hpp>
  14. std::unique_ptr<boost::mysql::detail::engine> boost::mysql::any_connection::create_engine(
  15. asio::any_io_executor ex,
  16. asio::ssl::context* ctx
  17. )
  18. {
  19. return std::unique_ptr<detail::engine>(new detail::engine_impl<detail::variant_stream>(std::move(ex), ctx)
  20. );
  21. }
  22. #endif