This makes it easier to return values convertible to T when the return type is Optional<T>. This is not a feature in the C++ Library Fundamentals TS for std::experimental::optional, but we've found it useful internally.
This is more controversial than the last three diffs I've posted, because it does make things potentially more ambiguous. In particular, David remarked:
A direct variadic ctor for Optional<T> that builds a T seems a bit subtle/surprising/easily ambiguous - a utility make function is probably more appropriate (make_optional to go with make_unique, etc?).
We've been using this internally already, and the most motivating case was trying to return a type constructed from multiple arguments, i.e.
Optional<std::pair<int, int>> test() { return { 1, 2 }; }
There's also an annoyance with implicit conversions needing to be made explicit:
Optional<StringRef> x = ""; // rejected Optional<StringRef> test() { return ""; // rejected }
But I do know that Implicit Conversions Are Dangerous, and I'd be willing to withdraw this (and go change our internal code), particularly if someone comes up with an example of this going awry.
(I've marked David as a reviewer because he took an interest in my original post, but I'd welcome comments from anyone here.)