https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65075
Bug ID: 65075 Summary: [5 Regression] constexpr regression Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org typedef void (*E) (); template <class T> constexpr E bar () { return []() {}; } void foo () { (bar<int> ()) (); } is rejected since r215954 aka PR55250 with -std=c++11: error: body of constexpr function ‘constexpr void (* bar())() [with T = int; E = void (*)()]’ not a return-statement The body is a return statement, just perhaps with some extra artificial statements created for the lambda.