[libc-commits] [PATCH] D131610: [libc][NFC] add arrow operator to optional
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Aug 10 12:13:06 PDT 2022
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
Good to go after adding smoke tests.
================
Comment at: libc/src/__support/CPP/optional.h:78
+
+ constexpr const T *operator->() const { return &Storage.StoredValue; }
};
----------------
For consistency with `operator*`, make it `const &` and add a non-const `&` flavor also.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131610/new/
https://reviews.llvm.org/D131610
More information about the libc-commits
mailing list