Function TYPE_SAFE_DETAIL_MAKE_OP

Summary

#include <include/type_safe/constrained_type.hpp>

(1) TYPE_SAFE_DETAIL_MAKE_OP(==) TYPE_SAFE_DETAIL_MAKE_OP(!

#include <include/type_safe/optional.hpp>

(2) TYPE_SAFE_DETAIL_MAKE_OP(==, !lhs.has_value(), !rhs.has_value()) TYPE_SAFE_DETAIL_MAKE_OP(!

(3) lhs rhs rhs !lhs true TYPE_SAFE_DETAIL_MAKE_OP(>, lhs.has_value(), false) TYPE_SAFE_DETAIL_MAKE_OP(>

Function overload

Synopsis

#include <include/type_safe/constrained_type.hpp>

TYPE_SAFE_DETAIL_MAKE_OP(==) TYPE_SAFE_DETAIL_MAKE_OP(!

Description

Compares a [ts::constrained_type]().

Returns
The result of the comparison of the underlying value. \notes The comparison operators do not participate in overload resolution, unless the stored type provides them as well. \synopsis_return bool \group constrained_comp -Constrained type comparison \synopsis_return bool \group constrained_comp
\group float_comp
Parameters

2 - \exclude

\group int_comp Comparison operators
Parameters

3 - \exclude

Source

Line 426 in include/type_safe/constrained_type.hpp.

Synopsis

#include <include/type_safe/optional.hpp>

TYPE_SAFE_DETAIL_MAKE_OP(==, !lhs.has_value(), !rhs.has_value()) TYPE_SAFE_DETAIL_MAKE_OP(!

Description

\group optional_comp_null

\group variant_comp_null

Comparison of [ts::basic_optional]() with [ts::nullopt]().

An optional is equal to [ts::nullopt]() if it does not have a value. Nothing is less than [ts::nullopt](), it is only less than an optional, A optional compares equal to nullopt, when it does not have a value. A optional compares never less to nullopt, nullopt compares less only if the optional has a value. The other comparisons behave accordingly. \group optional_comp_null Optional null comparison \module optional

Compares a [ts::basic_variant]() with [ts::nullvar]().

A variant compares equal to nullvar, when it does not have a value. A variant compares never less to nullvar, nullvar compares less only if the variant has a value. The other comparisons behave accordingly. \group variant_comp_null \module variant

Source

Line 581 in include/type_safe/optional.hpp.

Synopsis

#include <include/type_safe/optional.hpp>

lhs rhs rhs !lhs true TYPE_SAFE_DETAIL_MAKE_OP(>, lhs.has_value(), false) TYPE_SAFE_DETAIL_MAKE_OP(>

Description

\group optional_comp_null

\group optional_comp_null

\group variant_comp_null

Source

Line 589 in include/type_safe/optional.hpp.






Add Discussion as Guest

Log in