https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65750
Bug ID: 65750 Summary: miss interpret in a virtual member function with a C++11 style function signature Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: usagi at WonderRabbitProject dot net Repro: #include <functional> class a { virtual auto f( std::function< void () > ) -> void; virtual auto g( std::function< auto () -> void > ) -> void; }; auto main() -> int { } Result 1 ( g++-5.0.0, 4.9.2 and >= 4.9.0 ): prog.cc:6:16: error: implicit templates may not be 'virtual' virtual auto g( std::function< auto () -> void > ) -> void; Result 2 ( g++-4.8.2, g++4.7.3 ): (no errors, compile is succeed.) Result 3 ( clang++-3.7.0, 3.6.0, 3.5.0 and 3.4 ) (no errors, compile is succeed.)