28 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3// libstdc++ 4.2.x contains a bug where a friend struct template4// declaration for std::tr1::__detail::_Map base has different5// template arguments than the real declaration.6 7// We no longer contain the hack to workaround the problem. Verify that8// std::tr1::__detail::Map_base is not a unique and special snowflake.9 10namespace std { namespace tr1 { namespace __detail {11template <typename _Key, typename _Value, typename _Ex, bool __unique,12 // expected-note@-1{{previous template declaration}}13 typename _Hashtable>14struct _Map_base {};15} } } 16 17namespace std { namespace tr1 {18 template<typename T>19 struct X1 {20 template <typename _Key2, typename _Pair, typename _Hashtable>21 // expected-error@-1{{too few template parameters}}22 friend struct __detail::_Map_base;23 };24 25} }26 27std::tr1::X1<int> x1i; // expected-note{{in instantiation}}28