I don't have any experience working on compilers, but I imagine this should be possible to implement efficiently, although it would require an ABI extension. I imagine the alternative returns-paths to be part of the function type and thus affect name mangling.

What do you think?


To me this looks logically equivalent to exceptions, but harder to read.

 
Cheers,
Toby

References:
[1] http://lucteo.ro/2018/04/21/exception-exploration-2/
[2] Phil Nash's CppCon 2019 talk,
"The Dawn of a New Error" ( https://www.youtube.com/watch?v=ZUH8p1EQswA )
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


--
Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212