maths: abs should be constexpr

This commit is contained in:
Danny Robson 2018-09-27 14:17:54 +10:00
parent bc03b36ffc
commit 6b1dbb3834

View File

@ -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)
{ {