http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58077
Bug ID: 58077 Summary: Crash on matching template with bool type instead Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: a71104 at gmail dot com #include <iostream> using namespace std; template<typename _Type, typename _CharType = char, typename _Traits = char_traits<_CharType>> struct Foo { static void Bar(basic_istream<_CharType, _Traits>&); }; template<typename _CharType, typename _Traits> struct Foo<nullptr_t, _CharType, _Traits> { static void Bar(basic_istream<_CharType, _Traits> &ris) {} }; template<typename _CharType, typename _Traits> struct Foo<bool, _CharType, _Traits> { static void Bar(basic_istream<_CharType, _Traits> &ris) {} }; int main() { Foo<bool>::Bar(cin); return 0; } /* Note that it works if I remove the template specialized with nullptr_t */