[PATCH] D34405: [Testing/Support] Remove the const_cast in TakeExpected

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 09:26:23 PDT 2017


zturner added inline comments.


================
Comment at: include/llvm/Testing/Support/Error.h:34
+template <typename T> ExpectedHolder<T> TakeExpected(Expected<T> &&Exp) {
+  return TakeExpected(Exp);
 }
----------------
zturner wrote:
> Should this be `std::move(Exp)`?
Actually wait.  If we have an rvalue reference overload just delete the lvalue ref overload and put all the code in here.


https://reviews.llvm.org/D34405





More information about the llvm-commits mailing list