From b76d19c3cb5c19e1a0f5e86a6374ed3ccb481b27 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 19 May 2017 17:40:03 -0700 Subject: [PATCH] Tidy up buffer_prefix overloads and test --- CHANGELOG.md | 1 + include/beast/core/buffer_prefix.hpp | 3 ++- test/core/buffer_prefix.cpp | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) 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: