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?
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