[Basic] Use has_value (NFC)

This commit is contained in:
Kazu Hirata 2022-06-19 18:59:56 -07:00
parent 2ef7c4ce46
commit 05ff3790b3
1 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public:
return MaybeRef;
}
RefTy &getValue() & {
assert(hasValue());
assert(has_value());
return MaybeRef;
}
RefTy const &value() const & {
@ -146,7 +146,7 @@ public:
return MaybeRef;
}
RefTy const &getValue() const & {
assert(hasValue());
assert(has_value());
return MaybeRef;
}
RefTy &&value() && {
@ -154,7 +154,7 @@ public:
return std::move(MaybeRef);
}
RefTy &&getValue() && {
assert(hasValue());
assert(has_value());
return std::move(MaybeRef);
}