5 #ifndef VCCC_EXPECTED_UNEXPECTED_HPP_
6 #define VCCC_EXPECTED_UNEXPECTED_HPP_
36 template<
typename Err = E, std::enable_if_t<
conjunction<
39 std::is_constructible<E, Err>
42 : error_(
std::forward<Err>(
e)) {}
44 template<
typename... Args, std::enable_if_t<
45 std::is_constructible<E, Args...>
48 : error_(
std::forward<Args>(args)...) {}
50 template<
typename U,
typename... Args, std::enable_if_t<
51 std::is_constructible<E, std::initializer_list<U>&, Args...>
54 : error_(il,
std::forward<Args>(args)...) {}
59 constexpr
const E&
error() const& noexcept {
62 constexpr E&
error() & noexcept {
65 constexpr
const E&&
error() const&& noexcept {
66 return std::move(error_);
68 constexpr E&&
error() && noexcept {
69 return std::move(error_);
94 #if __cplusplus >= 201703L
97 unexpected(E) -> unexpected<E>;
Definition: unexpected.hpp:25
constexpr const E && error() const &&noexcept
Definition: unexpected.hpp:65
constexpr unexpected(Err &&e)
Definition: unexpected.hpp:41
constexpr unexpected & operator=(const unexpected &)=default
constexpr unexpected(unexpected &&)=default
constexpr unexpected & operator=(unexpected &&)=default
constexpr E && error() &&noexcept
Definition: unexpected.hpp:68
constexpr friend bool operator==(unexpected &x, unexpected< E2 > &y)
Definition: unexpected.hpp:79
constexpr friend bool operator!=(unexpected &x, unexpected< E2 > &y)
Definition: unexpected.hpp:84
constexpr void swap(unexpected &other) noexcept(is_nothrow_swappable< E >::value)
Definition: unexpected.hpp:73
constexpr unexpected(in_place_t, Args &&... args)
Definition: unexpected.hpp:47
constexpr E & error() &noexcept
Definition: unexpected.hpp:62
constexpr unexpected(const unexpected &)=default
constexpr const E & error() const &noexcept
Definition: unexpected.hpp:59
constexpr unexpected(in_place_t, std::initializer_list< U > il, Args &&... args)
Definition: unexpected.hpp:53
constexpr T e
the mathematical constant
Definition: constants.hpp:37
void swap(::vccc::optional< T > &lhs, ::vccc::optional< T > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Definition: swap.h:30
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: conjunction.hpp:22
in-place construction tag
Definition: in_place.hpp:25
Definition: is_swappable.hpp:125
Definition: is_specialization.hpp:30
Definition: negation.hpp:23