1 // RUN: %clang_cc1 -fsyntax-only %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. Clang has an
6 // egregious hack to work around this problem, since we can't modify
7 // all of the world's libstdc++'s.
8 
9 namespace std { namespace tr1 { namespace __detail {
10   template<typename _Key, typename _Value, typename _Ex, bool __unique,
11 	   typename _Hashtable>
12     struct _Map_base { };
13 
14 } } }
15 
16 namespace std { namespace tr1 {
17   template<typename T>
18   struct X1 {
19     template<typename _Key2, typename _Pair, typename _Hashtable>
20     friend struct __detail::_Map_base;
21   };
22 
23 } }
24 
25 std::tr1::X1<int> x1i;
26