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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template tolerance_based

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

Synopsis

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

template<typename T> 
struct tolerance_based : public tolerance_based_delegate::type< T, !is_array< T >::value &&!is_abstract_class_or_function< T >::value >
{
};

Description

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).


PrevUpHomeNext