On Tue, Jun 13, 2017 at 12:25 PM, Richard Hodges via Boost < boost@lists.boost.org> wrote:
Does anyone actually have a measurable example of real code in which the unexceptional path induces any more execution overhead than an optional/variant/outcome return type?
Because when I look at the code generated by gcc et all, I am convinced that you're solving a non-existant problem when seeking to replace exceptions.
By all means have a partial return type such as outcome if a failure is to result in a useful execution path.
But exceptions do not actually add overhead when used to signal actual exceptions.
At least in the millions of lines of code I have written and read.
All true. Noexcept is not better than using exception handling, it is better than *not* using exception handling without it. :)