3#ifndef TETL_EXPECTED_UNEXPECTED_HPP
4#define TETL_EXPECTED_UNEXPECTED_HPP
21 template <
typename Err = E>
30 template <
typename... Args>
43 [[nodiscard]]
constexpr auto error() const& noexcept -> E const& {
return _unex; }
45 [[nodiscard]]
constexpr auto error() &
noexcept -> E& {
return _unex; }
47 [[nodiscard]]
constexpr auto error() const&& noexcept -> E const&& {
return etl::move(_unex); }
49 [[nodiscard]]
constexpr auto error() &&
noexcept -> E&& {
return etl::move(_unex); }
57 template <
typename E2>
60 return lhs.error() == rhs.error();
constexpr auto move(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Moves the elements in the range [first, last), to another range beginning at destination,...
Definition move.hpp:26
Definition adjacent_find.hpp:8
constexpr bool is_constructible_v
Definition is_constructible.hpp:24
constexpr bool is_swappable_v
Definition is_swappable.hpp:21
unexpected(E) -> unexpected< E >
constexpr bool is_same_v
Definition is_same.hpp:11
auto swap(inplace_function< R(Args...), Capacity, Alignment > &lhs, inplace_function< R(Args...), Capacity, Alignment > &rhs) noexcept -> void
Overloads the etl::swap algorithm for etl::inplace_function. Exchanges the state of lhs with that of ...
Definition inplace_function.hpp:249
constexpr auto forward(remove_reference_t< T > ¶m) noexcept -> T &&
Forwards lvalues as either lvalues or as rvalues, depending on T. When t is a forwarding reference (a...
Definition forward.hpp:18
constexpr bool is_nothrow_swappable_v
Definition is_nothrow_swappable.hpp:19
Disambiguation tags that can be passed to the constructors of optional, variant, and any to indicate ...
Definition in_place.hpp:20
Definition unexpected.hpp:20
constexpr unexpected(unexpected &&)=default
constexpr unexpected(Err &&e)
Definition unexpected.hpp:25
constexpr auto swap(unexpected &other) noexcept(etl::is_nothrow_swappable_v< E >) -> void
Definition unexpected.hpp:51
constexpr unexpected(unexpected const &)=default
constexpr auto error() &noexcept -> E &
Definition unexpected.hpp:45
constexpr auto operator=(unexpected const &) -> unexpected &=default
constexpr auto error() const &noexcept -> E const &
Definition unexpected.hpp:43
constexpr unexpected(etl::in_place_t, Args &&... args)
Definition unexpected.hpp:32
constexpr auto error() const &&noexcept -> E const &&
Definition unexpected.hpp:47
friend constexpr auto swap(unexpected &x, unexpected &y) noexcept(noexcept(x.swap(y))) -> void requires(etl::is_swappable_v< E >)
Definition unexpected.hpp:63
friend constexpr auto operator==(unexpected const &lhs, unexpected< E2 > const &rhs) -> bool
Definition unexpected.hpp:58
constexpr auto error() &&noexcept -> E &&
Definition unexpected.hpp:49
constexpr auto operator=(unexpected &&) -> unexpected &=default