From 9a3cee3dee3f6086e6bbc9acf9e0cf6279235772 Mon Sep 17 00:00:00 2001 From: Igor Krivenko Date: Sat, 24 Aug 2024 16:24:39 +0200 Subject: [PATCH] [test] Replace `std::enable_if` with `requires` --- test/c++/test_kernel.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/c++/test_kernel.hpp b/test/c++/test_kernel.hpp index 2fde5a7e7..2303208fc 100644 --- a/test/c++/test_kernel.hpp +++ b/test/c++/test_kernel.hpp @@ -45,8 +45,9 @@ namespace som { // h5_read_mathematica_array(), complex arrays template -std::enable_if_t::value, ArrayType> -h5_read_mathematica_array(h5::group g, std::string const& name) { +ArrayType h5_read_mathematica_array(h5::group g, std::string const& name) + requires(is_complex::value) +{ array res_re, res_im; h5_read(g, name + "/re", res_re); h5_read(g, name + "/im", res_im); @@ -55,8 +56,9 @@ h5_read_mathematica_array(h5::group g, std::string const& name) { // h5_read_mathematica_array(), real arrays template -std::enable_if_t::value, ArrayType> -h5_read_mathematica_array(h5::group g, std::string const& name) { +ArrayType h5_read_mathematica_array(h5::group g, std::string const& name) + requires(!is_complex::value) +{ ArrayType res; h5_read(g, name, res); return res;