http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51157
Bug #: 51157 Summary: decltype/typeof of template member with default template argument confuses g++ Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: joerg.rich...@pdv-fs.de cat > t.cc << EOF struct Key { typedef int Ser; }; template <class S> struct Shell { template<class T = Key> typename T::Ser getId() const; }; void func() { decltype(&Shell<int>::getId) a; } EOF g++ -std=gnu++0x -c t.cc # results in: # ' # t.cc:13: confused by earlier errors, bailing out # GCC version 4.6.2