PATCH: add a c'tor to ErrorOr that allows us to perform two user defined conversions

Nick Lewycky via llvm-commits llvm-commits at
Wed Feb 3 18:58:27 PST 2016

The attached patch changes ErrorOr to make this code:

  ErrorOr<string> test() { return "literal"; }

work. Without this patch it fails because it would require two user-defined
conversions in a row. Please review!

I'm not sure whether it's correct to describe this as "perfect forwarding"?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erroror-implicitcast-1.patch
Type: text/x-patch
Size: 1353 bytes
Desc: not available
URL: <>

More information about the llvm-commits mailing list