Commit bbf32f49 authored by Praetorius, Simon's avatar Praetorius, Simon

bug in min/max implementation with fold expressions resolved

parent 0cdb5281
Pipeline #1729 passed with stage
in 46 minutes and 58 seconds
......@@ -47,7 +47,6 @@ namespace AMDiS
return a < b ? a : b;
}
#ifndef AMDIS_HAS_CXX_FOLD_EXPRESSIONS
template <class T0>
constexpr T0 min(T0 a)
{
......@@ -59,14 +58,6 @@ namespace AMDiS
{
return min(a, min(ts...));
}
#else
template <class T0, class... Ts>
constexpr auto min(T0 a, Ts... ts)
{
std::common_type_t<T0,Ts...> result = a;
return (result = min(result, ts), ...);
}
#endif
/// @}
......@@ -80,7 +71,6 @@ namespace AMDiS
return a < b ? b : a;
}
#ifndef AMDIS_HAS_CXX_FOLD_EXPRESSIONS
template <class T0>
constexpr T0 max(T0 a)
{
......@@ -92,14 +82,6 @@ namespace AMDiS
{
return max(a, max(ts...));
}
#else
template <class T0, class... Ts>
constexpr auto max(T0 a, Ts... ts)
{
std::common_type_t<T0,Ts...> result = a;
return (result = max(result, ts), ...);
}
#endif
/// @}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment