Skip to content
Snippets Groups Projects
Commit 07f40bbc authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Replace std::result_of_t by std::invoke_result_t

std::result_of_t is deprecated in C++17, and removed in C++20:

  https://en.cppreference.com/w/cpp/types/result_of
parent 7c839d70
No related branches found
No related tags found
1 merge request!81Replace std::result_of_t by std::invoke_result_t
Pipeline #65410 passed
...@@ -52,7 +52,7 @@ namespace Dune { ...@@ -52,7 +52,7 @@ namespace Dune {
* of the header string coincide to get a readable log. * of the header string coincide to get a readable log.
*/ */
template<class F, template<class F,
std::enable_if_t<std::is_convertible<std::result_of_t<F()>, Result>::value, int> = 0> std::enable_if_t<std::is_convertible<std::invoke_result_t<F>, Result>::value, int> = 0>
Criterion(F&& f, const std::string& header) : Criterion(F&& f, const std::string& header) :
f_(std::forward<F>(f)), f_(std::forward<F>(f)),
header_(header) header_(header)
...@@ -76,7 +76,7 @@ namespace Dune { ...@@ -76,7 +76,7 @@ namespace Dune {
* of the header string coincide to get a readable log. * of the header string coincide to get a readable log.
*/ */
template<class F, template<class F,
std::enable_if_t<std::is_convertible<std::result_of_t<F()>, std::string>::value, int> = 0> std::enable_if_t<std::is_convertible<std::invoke_result_t<F>, std::string>::value, int> = 0>
Criterion(F&& f, const std::string& header) : Criterion(F&& f, const std::string& header) :
f_( [=]() mutable {return std::make_tuple(false, f());} ), f_( [=]() mutable {return std::make_tuple(false, f());} ),
header_(header) header_(header)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment