Navigation :
Prerequisites
Build and install
Review of Error Handling Frameworks
Motivation
Future ABI stability guarantees
Tutorial
Recipes
Experimental
API reference
-
Macros
-
Concepts
-
Converters
-
Traits
-
Policies
-
Types
--
`basic_outcome<T, EC, EP, NoValuePolicy>`
--
`basic_result<T, E, NoValuePolicy>`
--- `basic_result() = delete`
--- `basic_result(basic_result &&)`
--- `basic_result(const basic_result &)`
--- `basic_result &operator=(basic_result &&)`
--- `basic_result &operator=(const basic_result &)`
--- `~basic_result()`
--- `basic_result(Args...) = delete`
--- `basic_result(X &&) = delete`
--- `basic_result(R &&)`
--- `basic_result(S &&)`
--- `basic_result(ErrorCondEnum &&)`
--- `explicit basic_result(concepts::value_or_error<T, E> &&)`
--- `explicit basic_result(const basic_result<R, S, P> &)`
--- `explicit basic_result(basic_result<R, S, P> &&)`
--- `explicit basic_result(const basic_result<R, S, P> &)`
--- `explicit basic_result(basic_result<R, S, P> &&)`
--- `explicit basic_result(const basic_result<R, S, P> &)`
--- `explicit basic_result(basic_result<R, S, P> &&)`
--- `explicit basic_result(in_place_type_t<value_type_if_enabled>, Args ...)`
--- `explicit basic_result(in_place_type_t<value_type_if_enabled>, std::initializer_list<U>, Args ...)`
--- `explicit basic_result(in_place_type_t<error_type_if_enabled>, Args ...)`
--- `explicit basic_result(in_place_type_t<error_type_if_enabled>, std::initializer_list<U>, Args ...)`
--- `basic_result(A1 &&, A2 &&, Args ...)`
--- `basic_result(const success_type<T> &)`
--- `basic_result(success_type<T> &&)`
--- `basic_result(const failure_type<T> &)`
--- `basic_result(failure_type<T> &&)`
--- `basic_result(const failure_type<T> &)`
--- `basic_result(failure_type<T> &&)`
--- `basic_result(const failure_type<T> &)`
--- `basic_result(failure_type<T> &&)`
--- `explicit operator bool() const noexcept`
--- `bool has_value() const noexcept`
--- `bool has_error() const noexcept`
--- `bool has_exception() const noexcept`
--- `bool has_failure() const noexcept`
--- `bool has_lost_consistency() const noexcept`
--- `value_type &assume_value() & noexcept`
--- `const value_type &assume_value() const & noexcept`
--- `value_type &&assume_value() && noexcept`
--- `const value_type &&assume_value() const && noexcept`
--- `value_type &value() &`
--- `const value_type &value() const &`
--- `value_type &&value() &&`
--- `const value_type &&value() const &&`
--- `error_type &assume_error() & noexcept`
--- `const error_type &assume_error() const & noexcept`
--- `error_type &&assume_error() && noexcept`
--- `const error_type &&assume_error() const && noexcept`
--- `error_type &error() &`
--- `const error_type &error() const &`
--- `error_type &&error() &&`
--- `const error_type &&error() const &&`
--- `bool operator==(const basic_result<A, B, C> &) const`
--- `bool operator==(const success_type<A> &) const`
--- `bool operator==(const failure_type<A, void> &) const`
--- `bool operator!=(const basic_result<A, B, C> &) const`
--- `bool operator!=(const success_type<A> &) const`
--- `bool operator!=(const failure_type<A, void> &) const`
--- `void swap(basic_result &)`
--- `auto as_failure() const &`
--- `auto as_failure() &&`
-- `bad_outcome_access`
-- `bad_result_access_with<EC>`
-- `bad_result_access`
-- `eager<T, Executor = void>/atomic_eager<T, Executor = void>`
-- `failure_type<EC, EP = void>`
-- `generator<T, Executor = void>`
-- `in_place_type_t<T>`
-- `lazy<T, Executor = void>/atomic_lazy<T, Executor = void>`
-- `success_type<T>`
-
Aliases
-
Functions
Frequently asked questions
Videos
Changelog
History
bool operator!=(const success_type<A> &) const
Returns true if this result is not successful or its value does not compares equal to the value in the success type sugar. Comparison is done using operator!=
on value_type
and A
. If A
is void
, this call aliases bool has_error() const noexcept
.
Requires : operator!=
must be a valid expression between value_type
and A
, or A
is void
. If value_type
is void
, then so must be A
.
Complexity : Whatever the underlying operator!=
has. Constexpr and noexcept of underlying operations is propagated.
Guarantees : None.