forked from boostorg/beast
Fix unreachable code warning in tests
This commit is contained in:
committed by
Mohammad Nejati
parent
b85b166e34
commit
4ea56c4b39
@@ -61,13 +61,11 @@ public:
|
||||
#define BOOST_BEAST_LOGIC_ERROR(s) \
|
||||
{ \
|
||||
BOOST_THROW_EXCEPTION(std::logic_error((s))); \
|
||||
BOOST_BEAST_UNREACHABLE(); \
|
||||
}
|
||||
|
||||
#define BOOST_BEAST_LOGIC_ERROR_RETURN(s, v) \
|
||||
{ \
|
||||
BOOST_THROW_EXCEPTION(std::logic_error((s))); \
|
||||
return v; \
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -94,13 +92,6 @@ struct buffers_cat_view_iterator_base
|
||||
{
|
||||
char unused = 0; // make g++8 happy
|
||||
|
||||
net::mutable_buffer
|
||||
operator*() const
|
||||
{
|
||||
BOOST_BEAST_LOGIC_ERROR_RETURN(
|
||||
"Dereferencing a one-past-the-end iterator", {});
|
||||
}
|
||||
|
||||
operator bool() const noexcept
|
||||
{
|
||||
return true;
|
||||
@@ -189,6 +180,13 @@ private:
|
||||
"Dereferencing a default-constructed iterator", {});
|
||||
}
|
||||
|
||||
reference
|
||||
operator()(mp11::mp_size_t<sizeof...(Bn)+1>)
|
||||
{
|
||||
BOOST_BEAST_LOGIC_ERROR_RETURN(
|
||||
"Dereferencing a one-past-the-end iterator", {});
|
||||
}
|
||||
|
||||
template<class I>
|
||||
reference operator()(I)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user