From d3f24157b8bd7e4484e72fcca811f203b3a29ba8 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 20 May 2022 09:36:58 -0700 Subject: [PATCH] silence unreachable code warning --- include/boost/beast/core/impl/buffers_cat.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/beast/core/impl/buffers_cat.hpp b/include/boost/beast/core/impl/buffers_cat.hpp index feb41ba4..61ff1f47 100644 --- a/include/boost/beast/core/impl/buffers_cat.hpp +++ b/include/boost/beast/core/impl/buffers_cat.hpp @@ -100,8 +100,12 @@ struct buffers_cat_view_iterator_base net::mutable_buffer operator*() const { + #if 1 + throw std::logic_error(""); + #else BOOST_BEAST_LOGIC_ERROR_RETURN({}, "Dereferencing a one-past-the-end iterator"); + #endif } operator bool() const noexcept @@ -188,8 +192,12 @@ private: reference operator()(mp11::mp_size_t<0>) { + #if 1 + throw std::logic_error(""); + #else BOOST_BEAST_LOGIC_ERROR_RETURN({}, "Dereferencing a default-constructed iterator"); + #endif } template