@@ -1778,7 +1778,7 @@ class expected
17781778 {
17791779 using U = expected_detail::remove_cvref_t <std::invoke_result_t <F, decltype (std::move (this ->m_val ))>>;
17801780 static_assert (expected_detail::is_specialization_v<U, expected>, " U (return type of F) must be specialization of expected" );
1781- static_assert (std::is_same_v<U::error_type, E>, " The error type must be the same after calling the F" );
1781+ static_assert (std::is_same_v<typename U::error_type, E>, " The error type must be the same after calling the F" );
17821782
17831783 if (has_value ())
17841784 return std::invoke (std::forward<F>(f), std::move (this ->m_val ));
@@ -1790,7 +1790,7 @@ class expected
17901790 {
17911791 using U = expected_detail::remove_cvref_t <std::invoke_result_t <F, decltype (std::move (this ->m_val ))>>;
17921792 static_assert (expected_detail::is_specialization_v<U, expected>, " U (return type of F) must be specialization of expected" );
1793- static_assert (std::is_same_v<U::error_type, E>, " The error type must be the same after calling the F" );
1793+ static_assert (std::is_same_v<typename U::error_type, E>, " The error type must be the same after calling the F" );
17941794
17951795 if (has_value ())
17961796 return std::invoke (std::forward<F>(f), std::move (this ->m_val ));
@@ -2469,7 +2469,7 @@ class expected<void, E>
24692469 {
24702470 using U = expected_detail::remove_cvref_t <std::invoke_result_t <F>>;
24712471 static_assert (expected_detail::is_specialization_v<U, expected>, " U (return type of F) must be specialization of expected" );
2472- static_assert (std::is_same_v<U::error_type, E>, " The error type must be the same after calling the F" );
2472+ static_assert (std::is_same_v<typename U::error_type, E>, " The error type must be the same after calling the F" );
24732473
24742474 if (has_value ())
24752475 return std::invoke (std::forward<F>(f));
@@ -2481,7 +2481,7 @@ class expected<void, E>
24812481 {
24822482 using U = expected_detail::remove_cvref_t <std::invoke_result_t <F>>;
24832483 static_assert (expected_detail::is_specialization_v<U, expected>, " U (return type of F) must be specialization of expected" );
2484- static_assert (std::is_same_v<U::error_type, E>, " The error type must be the same after calling the F" );
2484+ static_assert (std::is_same_v<typename U::error_type, E>, " The error type must be the same after calling the F" );
24852485
24862486 if (has_value ())
24872487 return std::invoke (std::forward<F>(f));
0 commit comments