Skip to content

Commit

Permalink
Merge pull request #1 from Chi-EEE/add_missing_typename
Browse files Browse the repository at this point in the history
fix: add missing typename
  • Loading branch information
X1aomu authored Apr 11, 2024
2 parents 7009017 + 18d1dfc commit bf5aa84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/zeus/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ class expected
{
using U = expected_detail::remove_cvref_t<std::invoke_result_t<F, decltype(std::move(this->m_val))>>;
static_assert(expected_detail::is_specialization_v<U, expected>, "U (return type of F) must be specialization of expected");
static_assert(std::is_same_v<U::error_type, E>, "The error type must be the same after calling the F");
static_assert(std::is_same_v<typename U::error_type, E>, "The error type must be the same after calling the F");

if (has_value())
return std::invoke(std::forward<F>(f), std::move(this->m_val));
Expand All @@ -1790,7 +1790,7 @@ class expected
{
using U = expected_detail::remove_cvref_t<std::invoke_result_t<F, decltype(std::move(this->m_val))>>;
static_assert(expected_detail::is_specialization_v<U, expected>, "U (return type of F) must be specialization of expected");
static_assert(std::is_same_v<U::error_type, E>, "The error type must be the same after calling the F");
static_assert(std::is_same_v<typename U::error_type, E>, "The error type must be the same after calling the F");

if (has_value())
return std::invoke(std::forward<F>(f), std::move(this->m_val));
Expand Down Expand Up @@ -2469,7 +2469,7 @@ class expected<void, E>
{
using U = expected_detail::remove_cvref_t<std::invoke_result_t<F>>;
static_assert(expected_detail::is_specialization_v<U, expected>, "U (return type of F) must be specialization of expected");
static_assert(std::is_same_v<U::error_type, E>, "The error type must be the same after calling the F");
static_assert(std::is_same_v<typename U::error_type, E>, "The error type must be the same after calling the F");

if (has_value())
return std::invoke(std::forward<F>(f));
Expand All @@ -2481,7 +2481,7 @@ class expected<void, E>
{
using U = expected_detail::remove_cvref_t<std::invoke_result_t<F>>;
static_assert(expected_detail::is_specialization_v<U, expected>, "U (return type of F) must be specialization of expected");
static_assert(std::is_same_v<U::error_type, E>, "The error type must be the same after calling the F");
static_assert(std::is_same_v<typename U::error_type, E>, "The error type must be the same after calling the F");

if (has_value())
return std::invoke(std::forward<F>(f));
Expand Down

0 comments on commit bf5aa84

Please sign in to comment.