3 ms·
Also worth mentioning: LLVM's ErrorOr [1] which is like Either but with the right always an std::error_code. Rather convenient for APIs. Also a remark: the aut
by stinos 9y ago
Also worth mentioning: LLVM's ErrorOr [1] which is like Either but with the right always an std::error_code. Rather convenient for APIs.
Also a remark: the author uses left()/right() calls excplicitly to construct Either instances. This should not be needed (given Either has the proper constructors). One could argue it is clearer, on the other hand one could say it adds unnecessary visual noise. I'm obviously in the latter camp else I wouldn't make this remark :]
[1] http://www.llvm.org/docs/doxygen/html/classllvm_1_1ErrorOr.html http://www.llvm.org/docs/doxygen/html/classllvm_1_1ErrorOr.h...