mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
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:
parent
104c166c83
commit
ef4210fba5
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user