Skip to content

Exception objects must be nothrow copy constructible (ERR60-CPP) #531

Description

@nlohmann

The SEI CERT C++ Coding Standard states in ERR60-CPP:

If the copy constructor for the exception object type throws during the copy initialization, std::terminate() is called, which can result in undefined behavior.

The user-defined exceptions all base on detail::exception which has a std::string member. The exceptions have to be refactored to satisfy std::is_nothrow_copy_constructible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions