http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53405
Bug #: 53405 Summary: Enum-dependent class template instantiations not recognized Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ib...@qult.net The following code compiles with GCC 4.4.6, doesn't with GCC 4.5.4 and 4.6.0, but does again with 4.7.0. I'm reporting this just in case the maintainers aren't aware of it. enum Tags { some_tag }; template <bool> struct BoolValue {}; template <Tags T> struct Foo { BoolValue<T == some_tag> meth(); }; template <Tags T> BoolValue<T == some_tag> Foo<T>::meth() {} The compiler complains about the return type of the method's definition being BoolValue<(T == (Tags)0u)> and not BoolValue<(T == some_tag)> which is clearly nonsense.