http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55558
--- Comment #2 from Alfred Krohmer <devkid at gmx dot net> 2012-12-01 21:18:00 UTC --- Well, this is awkward, not even a template class is needed, the following code also produces the bug: struct A { static int member; }; template<typename T> void foobar () { typedef decltype (A::member) myType; }