Skip to content

Commit bf5aa84

Browse files
authored
Merge pull request #1 from Chi-EEE/add_missing_typename
fix: add missing typename
2 parents 7009017 + 18d1dfc commit bf5aa84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/zeus/expected.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)