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 2023. The current version is 1.89.0.
Determine if T meets the
requirements of File.
Defined in header <boost/beast/core/file_base.hpp>
template< class T> struct is_file : public std::integral_constant< bool,... >
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 File> void f(File& file) { static_assert (is_file<File>::value, "File type requirements not met" ); ...
Use with std::enable_if (SFINAE):
template < class File> typename std::enable_if<is_file<File>::value>::type f(File& file);