Revert removal of deprecated lowest_layer from test::stream:

This reverts commit 3fb693eda6.
This commit is contained in:
Richard Hodges
2020-12-01 17:22:39 +01:00
parent 60d5745acc
commit 822722c6c3
3 changed files with 38 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
* Revert removal of lowest_layer_type from test stream.
--------------------------------------------------------------------------------
Version 305:
* Fix documentation build.

View File

@@ -186,6 +186,27 @@ class stream
std::unique_ptr<read_op_base>&& op,
std::size_t buf_size);
#if ! BOOST_BEAST_DOXYGEN
// boost::asio::ssl::stream needs these
// DEPRECATED
template<class>
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;

View File

@@ -13,6 +13,8 @@
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include <boost/beast/_experimental/test/handler.hpp>
#include <boost/asio/ssl/stream.hpp>
namespace boost {
namespace beast {
@@ -141,12 +143,23 @@ public:
sp.reset();
}
void
testAsioSSLCompat()
{
BOOST_STATIC_ASSERT(
std::is_same<
boost::asio::ssl::stream<test::stream>::
lowest_layer_type,
test::stream>::value);
}
void
run() override
{
testTestStream();
testSharedAbandon();
//testLifetimeViolation();
boost::ignore_unused(&stream_test::testAsioSSLCompat);
}
};