https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83427
Bug ID: 83427 Summary: [7/8 Regression] [C++17] weak result types and adaptable functions don't support noexcept functions Product: gcc Version: 7.2.1 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- This compiles in C++11 and C++14 mode, but fails for C++17 due to noexcept in the function type: #include <functional> int f() noexcept { return 0; } std::reference_wrapper<decltype(f)> r(f); decltype(r)::result_type i; auto b = std::bind(f); decltype(b)::result_type j; ne.cc:4:14: error: ‘result_type’ in ‘class std::reference_wrapper<int() noexcept>’ does not name a type decltype(r)::result_type i; ^~~~~~~~~~~ ne.cc:6:14: error: ‘result_type’ in ‘struct std::_Bind<int (*())() noexcept>’ does not name a type decltype(b)::result_type j; ^~~~~~~~~~~