diff --git a/CHANGELOG.md b/CHANGELOG.md index 824288dd..55906cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 43 * Require Boost 1.64.0 * Fix strict aliasing warnings in buffers_view +* Tidy up buffer_prefix overloads and test -------------------------------------------------------------------------------- diff --git a/include/beast/core/buffer_prefix.hpp b/include/beast/core/buffer_prefix.hpp index 52650976..dfad8ace 100644 --- a/include/beast/core/buffer_prefix.hpp +++ b/include/beast/core/buffer_prefix.hpp @@ -89,7 +89,8 @@ implementation_defined #else inline typename std::enable_if< - ! std::is_convertible::value, + ! std::is_same::value && + ! std::is_same::value, detail::buffer_prefix_helper>::type #endif buffer_prefix(std::size_t n, BufferSequence const& buffers) diff --git a/test/core/buffer_prefix.cpp b/test/core/buffer_prefix.cpp index 83e68ebe..1cfee4ed 100644 --- a/test/core/buffer_prefix.cpp +++ b/test/core/buffer_prefix.cpp @@ -9,12 +9,32 @@ #include #include +#include #include #include #include namespace beast { +static_assert( + std::is_same()))>::value, ""); + +static_assert( + is_const_buffer_sequence()))>::value, ""); + +static_assert( + std::is_same()))>::value, ""); +static_assert( + is_mutable_buffer_sequence()))>::value, ""); + class buffer_prefix_test : public beast::unit_test::suite { public: