diff --git a/include/boost/beast/core/impl/buffers_adaptor.hpp b/include/boost/beast/core/impl/buffers_adaptor.hpp index dc13efa5..94f03b5c 100644 --- a/include/boost/beast/core/impl/buffers_adaptor.hpp +++ b/include/boost/beast/core/impl/buffers_adaptor.hpp @@ -44,6 +44,7 @@ public: net::const_buffer>::type; struct iterator; + using const_iterator = iterator; // construct from two iterators plus optionally subrange definition subrange( diff --git a/test/beast/core/buffers_adaptor.cpp b/test/beast/core/buffers_adaptor.cpp index 31de910a..ce4acf35 100644 --- a/test/beast/core/buffers_adaptor.cpp +++ b/test/beast/core/buffers_adaptor.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -114,6 +115,15 @@ public: read_size(ba, 1024); } + void + testIssue2459() + { + char s[13]; + buffers_triple tb(s, sizeof(s)); + buffers_adaptor b(tb); + ignore_unused(net::buffers_begin(b.data())); + } + template void testSubrange() @@ -165,6 +175,7 @@ public: testDynamicBuffer(); testSpecial(); testIssue386(); + testIssue2459(); testSubrange(); testSubrange(); }