Skip to content
Snippets Groups Projects
Commit 736ed6d7 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/fold_expressions' into 'develop'

changed compiler feature detection name for fold expressions

See merge request spraetor/dune-amdis!82
parents db7e5135 bbf32f49
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ check_cxx_source_compiles("
{
f(0,1,2,3,4,5);
}
" AMDIS_HAS_CXX_FOLD_EXPRESSION
" AMDIS_HAS_CXX_FOLD_EXPRESSIONS
)
check_cxx_source_compiles("
......
......@@ -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
/// @}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment