Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Struct template has_requirement



// In header: <boost/log/sinks/frontend_requirements.hpp>

template<typename TestedT, typename RequiredT> 
struct has_requirement : public is_base_of< RequiredT, TestedT > {


A helper metafunction to check if a requirement is satisfied. The TestedT template argument should be the type combining one or several requirements and RequiredT is the requirement to test against. The metafunction will yield a positive result if TestedT supports RequiredT.