Skip to content

Mark functions with noexcept #40

Description

@wermos

Herb Sutter, one of the C++ gods, mentions in [GoTW 20] (http://www.gotw.ca/gotw/020.htm) that hidden execution paths can pollute an otherwise sane program/executable, because the compiler has to assume that anything that can throw, will throw.

However, our ray tracer does not throw any exceptions, and as of now, there is no plan to incorporate them into Rendera. Hence, we can promise the compiler that all of our functions do not throw exceptions using the noexcept keyword. This would allow us to ensure that we are keeping our promise to not throw exceptions (as the compiler will error out if we accidentally write code which can throw), and also allow the compiler to perform optimizations that it could not otherwise perform.

What to do

The task for this issue is quite simple: Go through the entire repository and mark all the functions with noexcept. (The ones where it makes sense to do so, at least, which should be most of them.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions