2 May
2013
2 May
'13
2:05 p.m.
On Thu, May 2, 2013 at 5:05 AM, Pierre T.
An expected is just a optional which have an error status when disengage. If expected is standardized in the future, it would be best to keep the same behaviour with the implicit/explicit cast as optional. Otherwise, I'm pretty sure it would lead to frustrating error from users using both.
Pierre T.
Yes, I agree it should be the same. Just note that optional isn't actually standardized yet and there will still be some changes before it is. Also, I think expected<> helps clarify optional's interface, as it applies the interface to additional coding patterns - so it can help with some of the changes that will happen to optional between now and the final C++14. Tony