Allow test::stream to be used with NORTTI:

Currently, the test stream code doesn't compile when both debug builds
(namely assertions) are enabled along with disabling rtti.  The current
code directly uses type_id(), which isn't available without rtti.

This commit allows stream.hpp to compile without rtti enabled.

Signed-off-by: Ed Tanous <ed@tanous.net>

close #2331
This commit is contained in:
Ed Tanous
2021-10-21 13:49:25 -07:00
committed by Richard Hodges
parent b15a5ff0e4
commit 4235525c6a
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Version XXX:
* Move library-specific docca configuration to Beast.
* Remove dependency on RTTI in `test::stream`.
--------------------------------------------------------------------------------
Version 320:
* Fix missing includes in `stream_state`.

View File

@ -214,7 +214,7 @@ public:
: in_(std::move(other.in_))
, out_(std::move(other.out_))
{
assert(in_->exec.target_type() == typeid(Executor2));
BOOST_ASSERT(in_->exec.template target<Executor2>() != nullptr);
in_->exec = executor_type(*in_->exec.template target<Executor2>());
}