Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2024. The current version is 1.89.0.
Determine if at type meets the requirements of SyncReadStream.
Defined in header <boost/beast/core/stream_traits.hpp>
template< class T> using is_sync_read_stream = see-below;
Metafunctions are used to perform compile time checking of template types.
This type will be std::true_type if T
meets the requirements, else the type will be std::false_type.
Use with static_assert:
template < class SyncReadStream> void f(SyncReadStream& stream) { static_assert (is_sync_read_stream<SyncReadStream>::value, "SyncReadStream type requirements not met" ); ...
Use with std::enable_if (SFINAE):
template < class SyncReadStream> typename std::enable_if<is_sync_read_stream<SyncReadStream>::value>::type f(SyncReadStream& stream);