diff --git a/CHANGELOG.md b/CHANGELOG.md index f0778a34..d62082de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +* Revert removal of lowest_layer_type from test stream. + +-------------------------------------------------------------------------------- + Version 305: * Fix documentation build. diff --git a/include/boost/beast/_experimental/test/stream.hpp b/include/boost/beast/_experimental/test/stream.hpp index 9d829530..6b725ba1 100644 --- a/include/boost/beast/_experimental/test/stream.hpp +++ b/include/boost/beast/_experimental/test/stream.hpp @@ -186,6 +186,27 @@ class stream std::unique_ptr&& op, std::size_t buf_size); +#if ! BOOST_BEAST_DOXYGEN + // boost::asio::ssl::stream needs these + // DEPRECATED + template + friend class boost::asio::ssl::stream; + // DEPRECATED + using lowest_layer_type = stream; + // DEPRECATED + lowest_layer_type& + lowest_layer() noexcept + { + return *this; + } + // DEPRECATED + lowest_layer_type const& + lowest_layer() const noexcept + { + return *this; + } +#endif + public: using buffer_type = flat_buffer; diff --git a/test/beast/_experimental/stream.cpp b/test/beast/_experimental/stream.cpp index d4089b20..65f326f2 100644 --- a/test/beast/_experimental/stream.cpp +++ b/test/beast/_experimental/stream.cpp @@ -13,6 +13,8 @@ #include #include +#include + namespace boost { namespace beast { @@ -141,12 +143,23 @@ public: sp.reset(); } + void + testAsioSSLCompat() + { + BOOST_STATIC_ASSERT( + std::is_same< + boost::asio::ssl::stream:: + lowest_layer_type, + test::stream>::value); + } + void run() override { testTestStream(); testSharedAbandon(); //testLifetimeViolation(); + boost::ignore_unused(&stream_test::testAsioSSLCompat); } };