Made the relational operators constexpr so they don't accidentally cause

compilation errors when they get pulled into the scope of template
metaprogramming expressions.
This commit is contained in:
Davis King 2016-08-15 18:27:06 -04:00
parent 104c166c83
commit ef4210fba5

View File

@ -283,7 +283,7 @@ namespace dlib
typename A,
typename B
>
bool operator> (
constexpr bool operator> (
const A& a,
const B& b
) { return b < a; }
@ -294,7 +294,7 @@ namespace dlib
typename A,
typename B
>
bool operator!= (
constexpr bool operator!= (
const A& a,
const B& b
) { return !(a == b); }
@ -305,7 +305,7 @@ namespace dlib
typename A,
typename B
>
bool operator<= (
constexpr bool operator<= (
const A& a,
const B& b
) { return !(b < a); }
@ -316,7 +316,7 @@ namespace dlib
typename A,
typename B
>
bool operator>= (
constexpr bool operator>= (
const A& a,
const B& b
) { return !(a < b); }