> And it's no longer possible to do if (std::error_code EC = ...) which makes > error-checking an explicit step that's easy to forget.
Quite the opposite. The main advantage of ErrorOr is that it makes error checking mandatory. Whet EC is the return type, it is possible to not check it and access the "actual return" type. With ErrorOr there is an assert that prevents one from getting the value if there is an error_code instead. That is true for any value returning function, but without c++11 ErrorOr<move-only-type> was too cumbersome to use, which is not longer the case. Cheers, Rafael _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
