Function has_value

Summary

#include <include/type_safe/optional.hpp>

(1) lhs has_value()) TYPE_SAFE_DETAIL_MAKE_OP(<

(2) lhs rhs rhs !lhs true !rhs lhs has_value() &&value_type(lhs.value())

Function overload

Synopsis

#include <include/type_safe/optional.hpp>

lhs has_value()) TYPE_SAFE_DETAIL_MAKE_OP(<

Description

\group optional_comp_null

\group variant_comp_null

\entity TYPE_SAFE_DETAIL_MAKE_OP \exclude Compares a [ts::basic_optional]() with a value.

An optional compares equal to a value if it has a value and the value compares equal. An optional compares less to a value if it does not have a value or the value compares less. A value compares less to an optional if the optional has a value and the value compares less than the optional. The other comparisons behave accordingly.

Value comparison is done by the comparison operator of the value_type, a function only participates in overload resolution if the value_type, has that comparison function. \synopsis_return bool \group optional_comp_value Optional value comparison \module optional

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

A variant compares equal to a value, if it contains an object of the same type and the object compares equal. A variant compares less to a value, if - when it has a different type - the type id compares less than the type id of the value, or - when it has the same type - the object compares less to the value. The other comparisons behave accordingly. \notes The value must not necessarily have a type that can be stored in the variant. \group variant_comp_t \module variant

Source

Line 583 in include/type_safe/optional.hpp.

Synopsis

#include <include/type_safe/optional.hpp>

lhs rhs rhs !lhs true !rhs lhs has_value() &&value_type(lhs.value())

Description

No description yet.

Source

Line 630 in include/type_safe/optional.hpp.






Add Discussion as Guest

Log in