feat fix GUARDED_BY
This commit is contained in:
parent
193826df35
commit
af0d3df984
@ -14,7 +14,8 @@
|
|||||||
#if defined(GUARDED_BY)
|
#if defined(GUARDED_BY)
|
||||||
#undef GUARDED_BY
|
#undef GUARDED_BY
|
||||||
#endif
|
#endif
|
||||||
#define GUARDED_BY(x) __attribute__((guarded_by(x)))
|
|
||||||
|
#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#define EXCLUSIVE_TRYLOCK_FUNCTION(...) THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__))
|
#define EXCLUSIVE_TRYLOCK_FUNCTION(...) THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__))
|
||||||
|
@ -96,13 +96,13 @@ public:
|
|||||||
T &&value() &&
|
T &&value() &&
|
||||||
{
|
{
|
||||||
CheckHasValue();
|
CheckHasValue();
|
||||||
return **this;
|
return std::move(**this);
|
||||||
}
|
}
|
||||||
|
|
||||||
T const &&value() const &&
|
T const &&value() const &&
|
||||||
{
|
{
|
||||||
CheckHasValue();
|
CheckHasValue();
|
||||||
return **this;
|
return std::move(**this);
|
||||||
}
|
}
|
||||||
|
|
||||||
T &value_or(T &&val) &
|
T &value_or(T &&val) &
|
||||||
|
Loading…
Reference in New Issue
Block a user