diff --git a/CHANGELOG.md b/CHANGELOG.md index 9990c9be..f76a7f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 191: * Add bind_front_handler * Use bind_front_handler * Simplify some type traits +* Use lean_tuple in buffers_cat -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/buffers_cat.hpp b/include/boost/beast/core/buffers_cat.hpp index cf9dd07c..14e7ecb8 100644 --- a/include/boost/beast/core/buffers_cat.hpp +++ b/include/boost/beast/core/buffers_cat.hpp @@ -11,8 +11,8 @@ #define BOOST_BEAST_BUFFERS_CAT_HPP #include +#include #include -#include namespace boost { namespace beast { @@ -24,7 +24,7 @@ namespace beast { template class buffers_cat_view { - std::tuple bn_; + detail::lean_tuple bn_; public: /** The type of buffer returned when dereferencing an iterator. diff --git a/include/boost/beast/core/impl/buffers_cat.ipp b/include/boost/beast/core/impl/buffers_cat.ipp index 9de1187f..1f50a96d 100644 --- a/include/boost/beast/core/impl/buffers_cat.ipp +++ b/include/boost/beast/core/impl/buffers_cat.ipp @@ -10,6 +10,7 @@ #ifndef BOOST_BEAST_IMPL_BUFFERS_CAT_IPP #define BOOST_BEAST_IMPL_BUFFERS_CAT_IPP +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include namespace boost { @@ -42,7 +42,7 @@ class buffers_cat_view::const_iterator } }; - std::tuple const* bn_ = nullptr; + detail::lean_tuple const* bn_ = nullptr; detail::variant::type..., past_end> it_; @@ -98,18 +98,18 @@ public: private: const_iterator( - std::tuple const& bn, bool at_end); + detail::lean_tuple const& bn, bool at_end); template void construct(C const&) { if(boost::asio::buffer_size( - std::get(*bn_)) != 0) + detail::get(*bn_)) != 0) { it_.template emplace( boost::asio::buffer_sequence_begin( - std::get(*bn_))); + detail::get(*bn_))); return; } construct(C{}); @@ -121,7 +121,7 @@ private: auto constexpr I = sizeof...(Bn)-1; it_.template emplace( boost::asio::buffer_sequence_begin( - std::get(*bn_))); + detail::get(*bn_))); } void @@ -137,11 +137,11 @@ private: next(C const&) { if(boost::asio::buffer_size( - std::get(*bn_)) != 0) + detail::get(*bn_)) != 0) { it_.template emplace( boost::asio::buffer_sequence_begin( - std::get(*bn_))); + detail::get(*bn_))); return; } next(C{}); @@ -160,11 +160,11 @@ private: prev(C const&) { if(boost::asio::buffer_size( - std::get(*bn_)) != 0) + detail::get(*bn_)) != 0) { it_.template emplace( boost::asio::buffer_sequence_end( - std::get(*bn_))); + detail::get(*bn_))); return; } prev(C{}); @@ -176,7 +176,7 @@ private: auto constexpr I = 0; it_.template emplace( boost::asio::buffer_sequence_end( - std::get(*bn_))); + detail::get(*bn_))); } template @@ -204,7 +204,7 @@ private: { if(++it_.template get() != boost::asio::buffer_sequence_end( - std::get(*bn_))) + detail::get(*bn_))) return; return next(C{}); } @@ -236,7 +236,7 @@ private: { if(it_.template get() != boost::asio::buffer_sequence_begin( - std::get(*bn_))) + detail::get(*bn_))) { --it_.template get(); return; @@ -252,7 +252,7 @@ private: auto constexpr I = 0; if(it_.template get() != boost::asio::buffer_sequence_begin( - std::get(*bn_))) + detail::get(*bn_))) { --it_.template get(); return; @@ -268,7 +268,7 @@ template buffers_cat_view:: const_iterator:: const_iterator( - std::tuple const& bn, bool at_end) + detail::lean_tuple const& bn, bool at_end) : bn_(&bn) { if(! at_end)