[PATCH] D139775: [ADT] Deprecate Optional<T>::create (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 09:23:20 PST 2022


kazu updated this revision to Diff 482166.
kazu added a comment.

Remove the function instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139775/new/

https://reviews.llvm.org/D139775

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
@@ -258,10 +258,6 @@
     Storage.emplace(std::forward<ArgTypes>(Args)...);
   }
 
-  static constexpr Optional create(const T *y) {
-    return y ? Optional(*y) : Optional();
-  }
-
   Optional &operator=(const T &y) {
     Storage = y;
     return *this;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139775.482166.patch
Type: text/x-patch
Size: 439 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221212/ef157dcb/attachment.bin>


More information about the llvm-commits mailing list