Merge pull request #17784 from yashykt/optionalconst

Add const qualifiers to member methods in Optional
pull/17848/head
Yash Tibrewal 6 years ago committed by GitHub
commit b52570c7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/core/lib/gprpp/optional.h

@ -31,11 +31,11 @@ class Optional {
set_ = true;
}
bool has_value() { return set_; }
bool has_value() const { return set_; }
void reset() { set_ = false; }
T value() { return value_; }
T value() const { return value_; }
private:
T value_;

Loading…
Cancel
Save