maths: make limit constexpr friendly

This commit is contained in:
Danny Robson 2015-10-29 10:50:34 +11:00
parent 556ba956a3
commit 4aeacc3a27

View File

@ -353,7 +353,7 @@ template <typename T, typename U, typename V>
constexpr T
limit [[gnu::pure]] (const T val, const U lo, const V hi)
{
CHECK_LE (lo, hi);
lo > hi ? (void)0 : panic ();
return val > hi ? hi:
val < lo ? lo: