buffers_cat fixes and coverage:

* Fix operator== for default constructed iterators
* More tests and code coverage
This commit is contained in:
Vinnie Falco
2018-12-19 20:59:20 -08:00
parent ad2cdf0281
commit c1d7a83af2
5 changed files with 107 additions and 38 deletions
@@ -18,7 +18,6 @@ namespace boost {
namespace beast {
namespace detail {
// This simple variant gets the job done without
// causing too much trouble with template depth:
//
@@ -170,6 +170,7 @@ private:
reference
operator()(mp11::mp_size_t<0>)
{
// Dereferencing a default-constructed iterator
BOOST_THROW_EXCEPTION(std::logic_error{
"invalid iterator"});
}
@@ -279,11 +280,11 @@ operator==(const_iterator const& other) const
(bn_ == nullptr) ?
(
other.bn_ == nullptr ||
other.it_.index() == sizeof...(Bn)
other.it_.index() == sizeof...(Bn) + 1
):(
(other.bn_ == nullptr) ?
(
it_.index() == sizeof...(Bn)
it_.index() == sizeof...(Bn) + 1
): (
bn_ == other.bn_ &&
it_ == other.it_