mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
std::isnan is not constexpr in C++17
This commit is contained in:
parent
07fa42644d
commit
d512e09eb8
@ -102,6 +102,7 @@ constexpr ret_type KiROUND( fp_type v )
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#if __cplusplus >= 202302L // isnan is not constexpr until C++23
|
||||||
else if constexpr( std::is_floating_point_v<fp_type> )
|
else if constexpr( std::is_floating_point_v<fp_type> )
|
||||||
{
|
{
|
||||||
if( std::isnan( v ) )
|
if( std::isnan( v ) )
|
||||||
@ -111,6 +112,7 @@ constexpr ret_type KiROUND( fp_type v )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret_type( max_ret( ret ) );
|
return ret_type( max_ret( ret ) );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user