https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102567
Bug ID: 102567 Summary: Missing noexcept specialization of std::function Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: fw at gcc dot gnu.org Target Milestone: --- When C++17 made noexcept part of the type system, std::function was not updated accordingly. As a result, this program fails to compile: #include <functional> std::function<void() noexcept> f; t.cc:2:32: error: aggregate ‘std::function<void() noexcept> f’ has incomplete type and cannot be defined 2 | std::function<void() noexcept> f; | ^ In earlier language versions, code like this used to compile because noexcept was not part of the type system. Seen with: gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)