forked from boostorg/beast
Relax requirements for vector_body:
fix: #1567 std::byte is not an arithmetic type, which caused compilation to fail when it was used in vector_body. Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
committed by
Vinnie Falco
parent
e53ccf251c
commit
45aaf22acd
@@ -3,6 +3,7 @@ Version 253:
|
|||||||
* Fix async_detect_ssl handler type
|
* Fix async_detect_ssl handler type
|
||||||
* member get_executor const-correctness
|
* member get_executor const-correctness
|
||||||
* Fix min/max on MSVC
|
* Fix min/max on MSVC
|
||||||
|
* Relax requirements for vector_body
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -39,8 +39,7 @@ template<class T, class Allocator = std::allocator<T>>
|
|||||||
struct vector_body
|
struct vector_body
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static_assert(sizeof(T) == 1 &&
|
static_assert(sizeof(T) == 1,
|
||||||
std::is_integral<T>::value,
|
|
||||||
"T requirements not met");
|
"T requirements not met");
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
// Test that header file is self-contained.
|
// Test that header file is self-contained.
|
||||||
#include <boost/beast/http/vector_body.hpp>
|
#include <boost/beast/http/vector_body.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace beast {
|
namespace beast {
|
||||||
@@ -18,6 +19,12 @@ BOOST_STATIC_ASSERT(is_body<vector_body<char>>::value);
|
|||||||
BOOST_STATIC_ASSERT(is_body_writer<vector_body<char>>::value);
|
BOOST_STATIC_ASSERT(is_body_writer<vector_body<char>>::value);
|
||||||
BOOST_STATIC_ASSERT(is_body_reader<vector_body<char>>::value);
|
BOOST_STATIC_ASSERT(is_body_reader<vector_body<char>>::value);
|
||||||
|
|
||||||
|
#if __cpp_lib_byte >= 201603
|
||||||
|
BOOST_STATIC_ASSERT(is_body<vector_body<std::byte>>::value);
|
||||||
|
BOOST_STATIC_ASSERT(is_body_writer<vector_body<std::byte>>::value);
|
||||||
|
BOOST_STATIC_ASSERT(is_body_reader<vector_body<std::byte>>::value);
|
||||||
|
#endif
|
||||||
|
|
||||||
} // http
|
} // http
|
||||||
} // beast
|
} // beast
|
||||||
} // boost
|
} // boost
|
||||||
|
Reference in New Issue
Block a user