[PATCH] D112278: Support: Add Expected<T>::moveInto() to avoid extra names

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 17:26:02 PDT 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Sounds nice to have!



================
Comment at: llvm/include/llvm/Support/Error.h:584
+      OtherT &Value,
+      std::enable_if_t<std::is_assignable<OtherT &, T &&>::value> * = nullptr) {
+    if (*this)
----------------
Should this be && qualified, so it can only be called on a temporary Expected, since it's going to consume it? (I mean `takeError` isn't rvalue ref qualified and `get` isn't - so it's not clear it has to be)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112278



More information about the llvm-commits mailing list