forked from boostorg/beast
Add buffer_traits.hpp, buffers_type
This commit is contained in:
1 parent
b6eb988694
commit
0a583a331d
8 files changed
+118
-1
No files matched your search
@@ -20,6 +20,7 @@ add_executable (tests-beast-core
|
||||
file_test.hpp
|
||||
bind_handler.cpp
|
||||
buffer.cpp
|
||||
buffer_traits.cpp
|
||||
buffered_read_stream.cpp
|
||||
buffers_adapter.cpp
|
||||
buffers_cat.cpp
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
local SOURCES =
|
||||
bind_handler.cpp
|
||||
buffer.cpp
|
||||
buffer_traits.cpp
|
||||
buffered_read_stream.cpp
|
||||
buffers_adapter.cpp
|
||||
buffers_cat.cpp
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (c) 2018 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <boost/beast/core/buffer_traits.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace beast {
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::is_same<net::const_buffer,
|
||||
buffers_type<net::const_buffer>>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::is_same<net::mutable_buffer,
|
||||
buffers_type<net::mutable_buffer>>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::is_same<net::const_buffer,
|
||||
buffers_type<std::array<net::const_buffer, 3>>>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::is_same<net::mutable_buffer,
|
||||
buffers_type<std::array<net::mutable_buffer, 3>>>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::is_same<void,
|
||||
buffers_type<std::array<int, 3>>>::value);
|
||||
|
||||
} // beast
|
||||
} // boost
|
||||
Reference in new issue
Block a user