[libcxx-commits] [PATCH] D102037: [libcxx][views] Add drop_view.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 21 16:46:01 PDT 2021
Quuxplusone added a comment.
@ldionne wrote:
> Here's what I ended up with that is not dependent on `non_propagating_cache` (we can go back afterwards and perhaps simplify some of this if we have `non_propagating_cache`)
FYI, that looks pretty nice to me. And then `non_propagating_cache` would just be a thin wrapper around an `optional` — all it needs to provide is `.has_value()`, `.get()` (maybe more than one ref-qualification of `.get()`?), `.assign` (i.e. the-equivalent-of-`operator=`, not the-equivalent-of-`.emplace`), and a default constructor. One might reasonably say "If Louis' code works, then why do we even want a factored-out `non_propagating_cache` type?" But, I answer, it's still useful to wrap `optional`, in order to reduce its surface area to just these four necessary bits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102037/new/
https://reviews.llvm.org/D102037
More information about the libcxx-commits
mailing list