5#ifndef DUNE_COMMON_STD_CMATH_HH 
    6#define DUNE_COMMON_STD_CMATH_HH 
   10#if __has_include(<version>) 
   12#if (__cpp_lib_constexpr_cmath < 202306L) 
   23#if (__cpp_lib_constexpr_cmath < 202202L) 
   29  if (std::is_constant_evaluated()) {
 
   30    return (t < 0) ? -t : t;
 
   40  requires(std::is_floating_point_v<T> || std::is_integral_v<T>)
 
   42  if (std::is_constant_evaluated()) {
 
   43    using TT = std::conditional_t<std::is_floating_point_v<T>, T, 
double>;
 
   44    if (t >= TT{ 0 } and t < std::numeric_limits<TT>::infinity()) {
 
   47      TT curr = t, prev = 0;
 
   49        prev = std::exchange(curr, TT{ 0.5 } * (curr + TT{ t } / curr));
 
   52      return std::numeric_limits<TT>::quiet_NaN();
 
Dune namespace.
Definition: alignedallocator.hh:13