[Basic] Use has_value (NFC)
This commit is contained in:
parent
2ef7c4ce46
commit
05ff3790b3
|
|
@ -138,7 +138,7 @@ public:
|
||||||
return MaybeRef;
|
return MaybeRef;
|
||||||
}
|
}
|
||||||
RefTy &getValue() & {
|
RefTy &getValue() & {
|
||||||
assert(hasValue());
|
assert(has_value());
|
||||||
return MaybeRef;
|
return MaybeRef;
|
||||||
}
|
}
|
||||||
RefTy const &value() const & {
|
RefTy const &value() const & {
|
||||||
|
|
@ -146,7 +146,7 @@ public:
|
||||||
return MaybeRef;
|
return MaybeRef;
|
||||||
}
|
}
|
||||||
RefTy const &getValue() const & {
|
RefTy const &getValue() const & {
|
||||||
assert(hasValue());
|
assert(has_value());
|
||||||
return MaybeRef;
|
return MaybeRef;
|
||||||
}
|
}
|
||||||
RefTy &&value() && {
|
RefTy &&value() && {
|
||||||
|
|
@ -154,7 +154,7 @@ public:
|
||||||
return std::move(MaybeRef);
|
return std::move(MaybeRef);
|
||||||
}
|
}
|
||||||
RefTy &&getValue() && {
|
RefTy &&getValue() && {
|
||||||
assert(hasValue());
|
assert(has_value());
|
||||||
return std::move(MaybeRef);
|
return std::move(MaybeRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue