annotation: add 'expect' wrapper
This commit is contained in:
parent
2c47a3654d
commit
5d8ee88772
@ -30,4 +30,13 @@ bool
|
||||
unlikely (T &&t)
|
||||
{ return __builtin_expect (!!t, false); }
|
||||
|
||||
|
||||
constexpr inline
|
||||
long
|
||||
expect (long val, long typical)
|
||||
{
|
||||
return __builtin_expect (val, typical);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user