Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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