[PATCH] D131829: [ADT] Implement Optional::transform
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 13 11:40:02 PDT 2022
kazu added a comment.
In D131829#3721330 <https://reviews.llvm.org/D131829#3721330>, @dblaikie wrote:
> Sounds good - in the abstract it'd bee good not to duplicate the code or testing (old testing could be minimized if old implementation were rewritten as a wrapper around the new implementation) - but it's perhaps not enough to matter (hardly likely to have much in the way of bug fixes/changes to the testing or implementation that could diverge) and will make it simpler/easier to remove the old one later - so whatever works best for you.
Thanks for the review! I wasn't sure I could safely turn `map` into a wrapper while preserving all the move semantics, the number of `&`, etc, so I just copied the code. :-P
We don't have a test for `map`, so adding a test for `transform` should be a pure improvement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131829/new/
https://reviews.llvm.org/D131829
More information about the llvm-commits
mailing list