Files
boost_beast/include/beast/core/buffer_concepts.hpp
T
Vinnie Falco d9562ff525 Harmonize concepts and identifiers with net-ts (API Change):
fix #321

This synchronizes identifier names and some implementation details
with the Networking-TS document and reference implementation.
The following interfaces have changed:

* async_completion
* is_buffer_sequence (removed)
* is_const_buffer_sequence (was is_ConstBufferSequence)
* is_dynamic_buffer (was is_DynamicBuffer)
* is_mutable_buffer_sequence (was is_MutableBufferSequence)
* async_result (new)
* BEAST_HANDLER_TYPE macro (new)
* BEAST_INITFN_RESULT_TYPE macro (new)

Filename changes:

* async_result.hpp (was async_completion.hpp)
2017-07-20 08:12:16 -07:00

56 lines
1.3 KiB
C++

//
// Copyright (c) 2013-2017 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)
//
#ifndef BEAST_BUFFER_CONCEPTS_HPP
#define BEAST_BUFFER_CONCEPTS_HPP
#include <beast/config.hpp>
#include <beast/core/detail/buffer_concepts.hpp>
#include <boost/asio/buffer.hpp>
#include <type_traits>
namespace beast {
/// Determine if `T` meets the requirements of @b ConstBufferSequence.
template<class T>
#if BEAST_DOXYGEN
struct is_const_buffer_sequence : std::integral_constant<bool, ...>
#else
struct is_const_buffer_sequence :
detail::is_buffer_sequence<T,
boost::asio::const_buffer>::type
#endif
{
};
/// Determine if `T` meets the requirements of @b DynamicBuffer.
template<class T>
#if BEAST_DOXYGEN
struct is_dynamic_buffer : std::integral_constant<bool, ...>
#else
struct is_dynamic_buffer :
detail::is_dynamic_buffer<T>::type
#endif
{
};
/// Determine if `T` meets the requirements of @b MutableBufferSequence.
template<class T>
#if BEAST_DOXYGEN
struct is_mutable_buffer_sequence : std::integral_constant<bool, ...>
#else
struct is_mutable_buffer_sequence :
detail::is_buffer_sequence<T,
boost::asio::mutable_buffer>::type
#endif
{
};
} // beast
#endif