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


Struct template tolerance_based

boost::math::fpc::tolerance_based — Indicates if a type can be compared using a tolerance scheme.


// In header: <boost/test/tools/floating_point_comparison.hpp>

template<typename T> 
struct tolerance_based : public tolerance_based_delegate::type {


This is a metafunction that should evaluate to mpl::true_ if the type T can be compared using a tolerance based method, typically for floating point types.

This metafunction can be specialized further to declare user types that are floating point (eg. boost.multiprecision).