Add log::level comparison operators
This commit is contained in:
parent
134ec550f5
commit
88fa197f8c
1 changed files with 20 additions and 0 deletions
|
|
@ -26,4 +26,24 @@ namespace psemek::log
|
|||
return s;
|
||||
}
|
||||
|
||||
inline bool operator < (level l1, level l2)
|
||||
{
|
||||
return static_cast<int>(l1) < static_cast<int>(l2);
|
||||
}
|
||||
|
||||
inline bool operator > (level l1, level l2)
|
||||
{
|
||||
return l2 < l1;
|
||||
}
|
||||
|
||||
inline bool operator <= (level l1, level l2)
|
||||
{
|
||||
return !(l2 < l1);
|
||||
}
|
||||
|
||||
inline bool operator >= (level l1, level l2)
|
||||
{
|
||||
return !(l1 < l2);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue