Hacker News new | ask | show | jobs
by olliej 678 days ago
A lot of people have answered no, which is likely the correct answer to what you're asking, but I wanted to be clear about exactly what that is?

Take a hypothetical piece of code

some_library_header.h:

    void library_function();
some_project_header_1.h:

    void project_function1();
some_project_header_2.h:

    void project_function2();

some_project_file.cpp:

    void project_function2() {
        /* definition */
        // no exception
    }

    void test_function1() {
        library_function();
    }

    void test_function2() {
        project_function1();
    }

    void test_function3() {
        project_function2();
    }

For your question, where are you wanting to know if the compiler can deduce noexcept?