[PATCH] D131842: [ADT] Deprecate Optional::map
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 14 17:52:07 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeeac9e923283: [ADT] Deprecate Optional::map (authored by kazu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131842/new/
https://reviews.llvm.org/D131842
Files:
llvm/include/llvm/ADT/Optional.h
Index: llvm/include/llvm/ADT/Optional.h
===================================================================
--- llvm/include/llvm/ADT/Optional.h
+++ llvm/include/llvm/ADT/Optional.h
@@ -348,6 +348,7 @@
return None;
}
template <class Function>
+ LLVM_DEPRECATED("Use transform instead.", "transform")
auto map(const Function &F) const & -> Optional<decltype(F(value()))> {
if (*this)
return F(value());
@@ -378,6 +379,7 @@
return None;
}
template <class Function>
+ LLVM_DEPRECATED("Use transform instead.", "transform")
auto map(const Function &F)
&& -> Optional<decltype(F(std::move(*this).value()))> {
if (*this)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131842.452578.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220815/a0cc06e0/attachment.bin>
More information about the llvm-commits
mailing list