maths: abs should be constexpr
This commit is contained in:
parent
bc03b36ffc
commit
6b1dbb3834
@ -38,6 +38,7 @@
|
|||||||
namespace cruft {
|
namespace cruft {
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
constexpr
|
||||||
std::enable_if_t<std::is_arithmetic_v<T>, T>
|
std::enable_if_t<std::is_arithmetic_v<T>, T>
|
||||||
abs [[gnu::const]] (T t)
|
abs [[gnu::const]] (T t)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user