Function TYPE_SAFE_DETAIL_MAKE_PREDICATE

Synopsis

#include <include/type_safe/boolean.hpp>

TYPE_SAFE_DETAIL_MAKE_PREDICATE(equal_to,==) TYPE_SAFE_DETAIL_MAKE_PREDICATE(not_equal_to

Description

\group comparison_functors

Comparison functors similar to the std:: version, but explicitly cast the result of the comparison to bool.

This allows using types where the comparison operator returns [ts::boolean](), as it can not be implicitly converted to bool so, for example, [std::less]() can not be used. \notes These comparison functors are always transparent, i.e. can be used with two different types. \group comparison_functors Comparison function objects \module types

Source

Line 193 in include/type_safe/boolean.hpp.






Add Discussion as Guest

Log in