/usr/include/boost/beast/core
NameSizeModeActions
detail/-0755rm
impl/-0755rm
async_base.hpp264610644editdlrm
basic_stream.hpp553420644editdlrm
bind_handler.hpp41720644editdlrm
buffered_read_stream.hpp118770644editdlrm
buffers_adaptor.hpp67830644editdlrm
buffers_cat.hpp33830644editdlrm
buffers_prefix.hpp61520644editdlrm
buffers_range.hpp42110644editdlrm
buffers_suffix.hpp39710644editdlrm
buffers_to_string.hpp17700644editdlrm
buffer_traits.hpp57570644editdlrm
detect_ssl.hpp223450644editdlrm
error.hpp22570644editdlrm
file.hpp10280644editdlrm
file_base.hpp50150644editdlrm
file_posix.hpp42220644editdlrm
file_stdio.hpp38490644editdlrm
file_win32.hpp42480644editdlrm
flat_buffer.hpp154270644editdlrm
flat_static_buffer.hpp87060644editdlrm
flat_stream.hpp126030644editdlrm
make_printable.hpp28030644editdlrm
multi_buffer.hpp181530644editdlrm
ostream.hpp26900644editdlrm
rate_policy.hpp45920644editdlrm
read_size.hpp18440644editdlrm
role.hpp13220644editdlrm
saved_handler.hpp37880644editdlrm
span.hpp47870644editdlrm
static_buffer.hpp85150644editdlrm
static_string.hpp257200644editdlrm
stream_traits.hpp163990644editdlrm
string.hpp19410644editdlrm
string_param.hpp34590644editdlrm
string_type.hpp10920644editdlrm
tcp_stream.hpp8530644editdlrm
Edit: /usr/include/boost/beast/core/buffer_traits.hpp (5757B)
// // Copyright (c) 2016-2019 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 // #ifndef BOOST_BEAST_BUFFER_TRAITS_HPP #define BOOST_BEAST_BUFFER_TRAITS_HPP #include #include #include #include #include #include #include namespace boost { namespace beast { /** Determine if a list of types satisfy the ConstBufferSequence requirements. This metafunction is used to determine if all of the specified types meet the requirements for constant buffer sequences. This type alias will be `std::true_type` if each specified type meets the requirements, otherwise, this type alias will be `std::false_type`. @tparam BufferSequence A list of zero or more types to check. If this list is empty, the resulting type alias will be `std::true_type`. */ template #if BOOST_BEAST_DOXYGEN using is_const_buffer_sequence = __see_below__; #else using is_const_buffer_sequence = mp11::mp_all< net::is_const_buffer_sequence< typename std::decay::type>...>; #endif /** Determine if a list of types satisfy the MutableBufferSequence requirements. This metafunction is used to determine if all of the specified types meet the requirements for mutable buffer sequences. This type alias will be `std::true_type` if each specified type meets the requirements, otherwise, this type alias will be `std::false_type`. @tparam BufferSequence A list of zero or more types to check. If this list is empty, the resulting type alias will be `std::true_type`. */ template #if BOOST_BEAST_DOXYGEN using is_mutable_buffer_sequence = __see_below__; #else using is_mutable_buffer_sequence = mp11::mp_all< net::is_mutable_buffer_sequence< typename std::decay::type>...>; #endif /** Type alias for the underlying buffer type of a list of buffer sequence types. This metafunction is used to determine the underlying buffer type for a list of buffer sequence. The equivalent type of the alias will vary depending on the template type argument: @li If every type in the list is a MutableBufferSequence, the resulting type alias will be `net::mutable_buffer`, otherwise @li The resulting type alias will be `net::const_buffer`. @par Example The following code returns the first buffer in a buffer sequence, or generates a compilation error if the argument is not a buffer sequence: @code template buffers_type buffers_front (BufferSequence const& buffers) { static_assert( net::is_const_buffer_sequence::value, "BufferSequence type requirements not met"); auto const first = net::buffer_sequence_begin (buffers); if (first == net::buffer_sequence_end (buffers)) return {}; return *first; } @endcode @tparam BufferSequence A list of zero or more types to check. If this list is empty, the resulting type alias will be `net::mutable_buffer`. */ template #if BOOST_BEAST_DOXYGEN using buffers_type = __see_below__; #else using buffers_type = typename std::conditional< is_mutable_buffer_sequence::value, net::mutable_buffer, net::const_buffer>::type; #endif /** Type alias for the iterator type of a buffer sequence type. This metafunction is used to determine the type of iterator used by a particular buffer sequence. @tparam T The buffer sequence type to use. The resulting type alias will be equal to the iterator type used by the buffer sequence. */ template #if BOOST_BEAST_DOXYGEN using buffers_iterator_type = __see_below__; #elif BOOST_WORKAROUND(BOOST_MSVC, < 1910) using buffers_iterator_type = typename detail::buffers_iterator_type_helper< typename std::decay::type>::type; #else using buffers_iterator_type = decltype(net::buffer_sequence_begin( std::declval())); #endif /** Return the total number of bytes in a buffer or buffer sequence This function returns the total number of bytes in a buffer, buffer sequence, or object convertible to a buffer. Specifically it may be passed: @li A ConstBufferSequence or MutableBufferSequence @li A `net::const_buffer` or `net::mutable_buffer` @li An object convertible to `net::const_buffer` This function is designed as an easier-to-use replacement for `net::buffer_size`. It recognizes customization points found through argument-dependent lookup. The call `beast::buffer_bytes(b)` is equivalent to performing: @code using net::buffer_size; return buffer_size(b); @endcode In addition this handles types which are convertible to `net::const_buffer`; these are not handled by `net::buffer_size`. @param buffers The buffer or buffer sequence to calculate the size of. @return The total number of bytes in the buffer or sequence. */ #if BOOST_BEAST_DOXYGEN template std::size_t buffer_bytes(BufferSequence const& buffers); #else BOOST_BEAST_INLINE_VARIABLE(buffer_bytes, detail::buffer_bytes_impl) #endif } // beast } // boost #endif