From 4235525c6a1d2224bb25f62cfcc74f02f1ce844b Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Thu, 21 Oct 2021 13:49:25 -0700 Subject: [PATCH] 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 close #2331 --- CHANGELOG.md | 7 +++++++ include/boost/beast/_experimental/test/stream.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcb4df9c..e9042525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. diff --git a/include/boost/beast/_experimental/test/stream.hpp b/include/boost/beast/_experimental/test/stream.hpp index f9626923..f404cbca 100644 --- a/include/boost/beast/_experimental/test/stream.hpp +++ b/include/boost/beast/_experimental/test/stream.hpp @@ -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() != nullptr); in_->exec = executor_type(*in_->exec.template target()); }