• Home
  • Raw
  • Download

Lines Matching refs:Exp

3778 template <class Exp>
3779 using exp_t = typename detail::decay_t<Exp>::value_type;
3780 template <class Exp>
3781 using err_t = typename detail::decay_t<Exp>::error_type;
3782 template <class Exp, class Ret>
3783 using ret_t = expected<Ret, err_t<Exp>>;
3786 template <class Exp, class F,
3787 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3789 *std::declval<Exp>()))>
3790 constexpr auto and_then_impl(Exp &&exp, F &&f) {
3794 ? detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp))
3795 : Ret(unexpect, std::forward<Exp>(exp).error());
3798 template <class Exp, class F,
3799 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3801 constexpr auto and_then_impl(Exp &&exp, F &&f) {
3805 : Ret(unexpect, std::forward<Exp>(exp).error());
3810 template <class Exp, class F,
3812 *std::declval<Exp>())),
3813 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr>
3814 auto and_then_impl(Exp &&exp, F &&f) -> Ret {
3818 ? detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp))
3819 : Ret(unexpect, std::forward<Exp>(exp).error());
3822 template <class Exp, class F,
3824 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr>
3825 constexpr auto and_then_impl(Exp &&exp, F &&f) -> Ret {
3829 : Ret(unexpect, std::forward<Exp>(exp).error());
3834 template <class Exp, class F,
3835 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3837 *std::declval<Exp>())),
3839 constexpr auto expected_map_impl(Exp &&exp, F &&f) {
3840 using result = ret_t<Exp, detail::decay_t<Ret>>;
3842 *std::forward<Exp>(exp)))
3843 : result(unexpect, std::forward<Exp>(exp).error());
3846 template <class Exp, class F,
3847 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3849 *std::declval<Exp>())),
3851 auto expected_map_impl(Exp &&exp, F &&f) {
3852 using result = expected<void, err_t<Exp>>;
3854 detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp));
3858 return result(unexpect, std::forward<Exp>(exp).error());
3861 template <class Exp, class F,
3862 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3865 constexpr auto expected_map_impl(Exp &&exp, F &&f) {
3866 using result = ret_t<Exp, detail::decay_t<Ret>>;
3868 : result(unexpect, std::forward<Exp>(exp).error());
3871 template <class Exp, class F,
3872 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3875 auto expected_map_impl(Exp &&exp, F &&f) {
3876 using result = expected<void, err_t<Exp>>;
3882 return result(unexpect, std::forward<Exp>(exp).error());
3885 template <class Exp, class F,
3886 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3888 *std::declval<Exp>())),
3891 constexpr auto expected_map_impl(Exp &&exp, F &&f)
3892 -> ret_t<Exp, detail::decay_t<Ret>> {
3893 using result = ret_t<Exp, detail::decay_t<Ret>>;
3896 *std::forward<Exp>(exp)))
3897 : result(unexpect, std::forward<Exp>(exp).error());
3900 template <class Exp, class F,
3901 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3903 *std::declval<Exp>())),
3906 auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
3908 detail::invoke(std::forward<F>(f), *std::forward<Exp>(exp));
3912 return unexpected<err_t<Exp>>(std::forward<Exp>(exp).error());
3915 template <class Exp, class F,
3916 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3920 constexpr auto expected_map_impl(Exp &&exp, F &&f)
3921 -> ret_t<Exp, detail::decay_t<Ret>> {
3922 using result = ret_t<Exp, detail::decay_t<Ret>>;
3925 : result(unexpect, std::forward<Exp>(exp).error());
3928 template <class Exp, class F,
3929 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3933 auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
3939 return unexpected<err_t<Exp>>(std::forward<Exp>(exp).error());
3945 template <class Exp, class F,
3946 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3948 std::declval<Exp>().error())),
3950 constexpr auto map_error_impl(Exp &&exp, F &&f) {
3951 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
3953 ? result(*std::forward<Exp>(exp))
3955 std::forward<Exp>(exp).error()));
3957 template <class Exp, class F,
3958 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
3960 std::declval<Exp>().error())),
3962 auto map_error_impl(Exp &&exp, F &&f) {
3963 using result = expected<exp_t<Exp>, monostate>;
3965 return result(*std::forward<Exp>(exp));
3968 detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
3971 template <class Exp, class F,
3972 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3974 std::declval<Exp>().error())),
3976 constexpr auto map_error_impl(Exp &&exp, F &&f) {
3977 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
3981 std::forward<Exp>(exp).error()));
3983 template <class Exp, class F,
3984 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
3986 std::declval<Exp>().error())),
3988 auto map_error_impl(Exp &&exp, F &&f) {
3989 using result = expected<exp_t<Exp>, monostate>;
3994 detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
3998 template <class Exp, class F,
3999 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
4001 std::declval<Exp>().error())),
4003 constexpr auto map_error_impl(Exp &&exp, F &&f)
4004 -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
4005 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4008 ? result(*std::forward<Exp>(exp))
4010 std::forward<Exp>(exp).error()));
4013 template <class Exp, class F,
4014 detail::enable_if_t<!std::is_void<exp_t<Exp>>::value> * = nullptr,
4016 std::declval<Exp>().error())),
4018 auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
4019 using result = expected<exp_t<Exp>, monostate>;
4021 return result(*std::forward<Exp>(exp));
4024 detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
4028 template <class Exp, class F,
4029 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
4031 std::declval<Exp>().error())),
4033 constexpr auto map_error_impl(Exp &&exp, F &&f)
4034 -> expected<exp_t<Exp>, detail::decay_t<Ret>> {
4035 using result = expected<exp_t<Exp>, detail::decay_t<Ret>>;
4040 std::forward<Exp>(exp).error()));
4043 template <class Exp, class F,
4044 detail::enable_if_t<std::is_void<exp_t<Exp>>::value> * = nullptr,
4046 std::declval<Exp>().error())),
4048 auto map_error_impl(Exp &&exp, F &&f) -> expected<exp_t<Exp>, monostate> {
4049 using result = expected<exp_t<Exp>, monostate>;
4054 detail::invoke(std::forward<F>(f), std::forward<Exp>(exp).error());
4060 template <class Exp, class F,
4062 std::declval<Exp>().error())),
4064 constexpr auto or_else_impl(Exp &&exp, F &&f) {
4066 return exp.has_value() ? std::forward<Exp>(exp)
4068 std::forward<Exp>(exp).error());
4071 template <class Exp, class F,
4073 std::declval<Exp>().error())),
4075 detail::decay_t<Exp> or_else_impl(Exp &&exp, F &&f) {
4076 return exp.has_value() ? std::forward<Exp>(exp)
4078 std::forward<Exp>(exp).error()),
4079 std::forward<Exp>(exp));
4082 template <class Exp, class F,
4084 std::declval<Exp>().error())),
4086 auto or_else_impl(Exp &&exp, F &&f) -> Ret {
4088 return exp.has_value() ? std::forward<Exp>(exp)
4090 std::forward<Exp>(exp).error());
4093 template <class Exp, class F,
4095 std::declval<Exp>().error())),
4097 detail::decay_t<Exp> or_else_impl(Exp &&exp, F &&f) {
4098 return exp.has_value() ? std::forward<Exp>(exp)
4100 std::forward<Exp>(exp).error()),
4101 std::forward<Exp>(exp));