1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 // libstdc++ 4.2.x contains a bug where a friend struct template
4 // declaration for std::tr1::__detail::_Map base has different
5 // template arguments than the real declaration.
6 
7 // We no longer contain the hack to workaround the problem.  Verify that
8 // std::tr1::__detail::Map_base is not a unique and special snowflake.
9 
10 namespace std { namespace tr1 { namespace __detail {
11 template <typename _Key, typename _Value, typename _Ex, bool __unique,
12           // expected-note@-1{{previous template declaration}}
13           typename _Hashtable>
14 struct _Map_base {};
15 } } }
16 
17 namespace 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 
27 std::tr1::X1<int> x1i; // expected-note{{in instantiation}}
28