diff --git a/dune/solvers/solvers/criterion.hh b/dune/solvers/solvers/criterion.hh index 54473242708eec8d87c1b5fc53ab45a05bb90587..cbdcb2f3b4d3ccd966749ca6e91d05a054f6575c 100644 --- a/dune/solvers/solvers/criterion.hh +++ b/dune/solvers/solvers/criterion.hh @@ -7,6 +7,7 @@ #include <string> #include <tuple> #include <memory> +#include <type_traits> #include <dune/common/stringutility.hh> @@ -28,12 +29,6 @@ namespace Dune { */ class Criterion { - template <typename F> - using result_of_t = typename std::result_of<F>::type; - - template <bool Condition, typename T=void> - using enable_if_t = typename std::enable_if<Condition, T>::type; - typedef std::tuple<bool, std::string> Result; public: @@ -56,7 +51,7 @@ namespace Dune { * of the header string coincide to get a readable log. */ template<class F, - enable_if_t<std::is_convertible<result_of_t<F()>, Result>::value, int> = 0> + std::enable_if_t<std::is_convertible<std::result_of_t<F()>, Result>::value, int> = 0> Criterion(F&& f, const std::string& header) : f_(std::forward<F>(f)), header_(header) @@ -80,7 +75,7 @@ namespace Dune { * of the header string coincide to get a readable log. */ template<class F, - enable_if_t<std::is_convertible<result_of_t<F()>, std::string>::value, int> = 0> + std::enable_if_t<std::is_convertible<std::result_of_t<F()>, std::string>::value, int> = 0> Criterion(F&& f, const std::string& header) : f_( [=]() {return std::make_tuple(false, f());} ), header_(header)