Lines Matching defs:expected

1596  * The input is expected to be UTF-8.
1763 /* begin file include/ada/expected.h */
1765 * @file expected.h
1766 * @brief Definitions for std::expected
1770 // expected - An implementation of std::expected with extensions
1899 class expected;
2176 // Trait for checking if a type is a tl::expected
2180 struct is_expected_impl<expected<T, E>> : std::true_type {};
2188 !std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
2195 !std::is_constructible<T, expected<U, G> &>::value &&
2196 !std::is_constructible<T, expected<U, G> &&>::value &&
2197 !std::is_constructible<T, const expected<U, G> &>::value &&
2198 !std::is_constructible<T, const expected<U, G> &&>::value &&
2199 !std::is_convertible<expected<U, G> &, T>::value &&
2200 !std::is_convertible<expected<U, G> &&, T>::value &&
2201 !std::is_convertible<const expected<U, G> &, T>::value &&
2202 !std::is_convertible<const expected<U, G> &&, T>::value>;
2232 // `expected`
2281 // so the destructor of the `expected` can be trivial.
2990 // expected_default_ctor_base will ensure that expected has a deleted default
3033 return "Bad expected access";
3045 /// An `expected<T, E>` object is an object that contains the storage for
3048 /// `E`. The contained object may not be initialized after the expected object
3049 /// has been initialized, and may not be destroyed before the expected object
3051 /// tracked by the expected object.
3053 class expected : private detail::expected_move_assign_base<T, E>,
3121 std::declval<expected &>(), std::forward<F>(f))) {
3126 std::declval<expected &&>(), std::forward<F>(f))) {
3131 std::declval<expected const &>(), std::forward<F>(f))) {
3138 std::declval<expected const &&>(), std::forward<F>(f))) {
3165 std::declval<expected &>(), std::declval<F &&>()))
3170 TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
3176 constexpr decltype(expected_map_impl(std::declval<const expected &>(),
3184 constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
3213 std::declval<expected &>(), std::declval<F &&>()))
3218 TL_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval<expected>(),
3224 constexpr decltype(expected_map_impl(std::declval<const expected &>(),
3232 constexpr decltype(expected_map_impl(std::declval<const expected &&>(),
3260 TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
3266 TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
3272 constexpr decltype(map_error_impl(std::declval<const expected &>(),
3280 constexpr decltype(map_error_impl(std::declval<const expected &&>(),
3307 TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &>(),
3313 TL_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval<expected &&>(),
3319 constexpr decltype(map_error_impl(std::declval<const expected &>(),
3327 constexpr decltype(map_error_impl(std::declval<const expected &&>(),
3335 expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) & {
3340 expected TL_EXPECTED_11_CONSTEXPR or_else(F &&f) && {
3345 expected constexpr or_else(F &&f) const & {
3351 expected constexpr or_else(F &&f) const && {
3355 constexpr expected() = default;
3356 constexpr expected(const expected &rhs) = default;
3357 constexpr expected(expected &&rhs) = default;
3358 expected &operator=(const expected &rhs) = default;
3359 expected &operator=(expected &&rhs) = default;
3364 constexpr expected(in_place_t, Args &&...args)
3371 constexpr expected(in_place_t, std::initializer_list<U> il, Args &&...args)
3380 explicit constexpr expected(const unexpected<G> &e)
3389 constexpr expected(unexpected<G> const &e)
3397 explicit constexpr expected(unexpected<G> &&e) noexcept(
3406 constexpr expected(unexpected<G> &&e) noexcept(
3414 constexpr explicit expected(unexpect_t, Args &&...args)
3421 constexpr explicit expected(unexpect_t, std::initializer_list<U> il,
3432 explicit TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
3447 TL_EXPECTED_11_CONSTEXPR expected(const expected<U, G> &rhs)
3461 explicit TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
3475 TL_EXPECTED_11_CONSTEXPR expected(expected<U, G> &&rhs)
3488 explicit TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
3489 : expected(in_place, std::forward<U>(v)) {}
3495 TL_EXPECTED_MSVC2015_CONSTEXPR expected(U &&v)
3496 : expected(in_place, std::forward<U>(v)) {}
3504 (!std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
3510 expected &operator=(U &&v) {
3528 (!std::is_same<expected<T, E>, detail::decay_t<U>>::value &&
3534 expected &operator=(U &&v) {
3561 expected &operator=(const unexpected<G> &rhs) {
3576 expected &operator=(unexpected<G> &&rhs) noexcept {
3673 void swap_where_both_have_value(expected & /*rhs*/, t_is_void) noexcept {
3677 void swap_where_both_have_value(expected &rhs, t_is_not_void) {
3682 void swap_where_only_one_has_value(expected &rhs, t_is_void) noexcept(
3689 void swap_where_only_one_has_value(expected &rhs, t_is_not_void) {
3696 expected &rhs, t_is_nothrow_move_constructible,
3707 expected &rhs, t_is_nothrow_move_constructible,
3730 expected &rhs, move_constructing_t_can_throw,
3758 swap(expected &rhs) noexcept(
3880 using ret_t = expected<Ret, err_t<Exp>>;
3888 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
3899 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
3912 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
3923 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
3949 using result = expected<void, err_t<Exp>>;
3973 using result = expected<void, err_t<Exp>>;
4003 auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
4030 auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
4048 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4060 using result = expected<exp_t<Exp>, monostate>;
4074 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4086 using result = expected<exp_t<Exp>, monostate>;
4101 -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
4102 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4115 auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
4116 using result = expected<exp_t<Exp>, monostate>;
4131 -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
4132 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4145 auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
4146 using result = expected<exp_t<Exp>, monostate>;
4162 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
4184 static_assert(detail::is_expected<Ret>::value, "F must return an expected");
4204 constexpr bool operator==(const expected<T, E> &lhs,
4205 const expected<U, F> &rhs) {
4211 constexpr bool operator!=(const expected<T, E> &lhs,
4212 const expected<U, F> &rhs) {
4218 constexpr bool operator==(const expected<void, E> &lhs,
4219 const expected<void, F> &rhs) {
4225 constexpr bool operator!=(const expected<void, E> &lhs,
4226 const expected<void, F> &rhs) {
4233 constexpr bool operator==(const expected<T, E> &x, const U &v) {
4237 constexpr bool operator==(const U &v, const expected<T, E> &x) {
4241 constexpr bool operator!=(const expected<T, E> &x, const U &v) {
4245 constexpr bool operator!=(const U &v, const expected<T, E> &x) {
4250 constexpr bool operator==(const expected<T, E> &x, const unexpected<E> &e) {
4254 constexpr bool operator==(const unexpected<E> &e, const expected<T, E> &x) {
4258 constexpr bool operator!=(const expected<T, E> &x, const unexpected<E> &e) {
4262 constexpr bool operator!=(const unexpected<E> &e, const expected<T, E> &x) {
4272 void swap(expected<T, E> &lhs,
4273 expected<T, E> &rhs) noexcept(noexcept(lhs.swap(rhs))) {
4279 /* end file include/ada/expected.h */
5437 * The input is expected to be UTF-8.
6058 // computing the expected password.
6128 // computing the expected password.
6247 // computing the expected password.
7114 using result = tl::expected<result_type, ada::errors>;