[PATCH] D139775: [ADT] Remove Optional<T>::create

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 10:34:52 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa0b97a424724: [ADT] Remove Optional<T>::create (authored by kazu).

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.482928.patch
Type: text/x-patch
Size: 439 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/72f5ece7/attachment.bin>


More information about the llvm-commits mailing list