Add const operator* to optional.
This commit is contained in:
parent
b102c3adef
commit
9f138ba596
@ -60,6 +60,9 @@ class optional {
|
||||
T &operator*() {
|
||||
return value();
|
||||
}
|
||||
const T &operator*() const {
|
||||
return value();
|
||||
}
|
||||
T unwrap() {
|
||||
CHECK(*this);
|
||||
auto res = std::move(value());
|
||||
|
Loading…
Reference in New Issue
Block a user