[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / libstdcxx_map_base_hack.cpp
blob3662f667c000992bb5ed0a9a8cb5abd810686325
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
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.
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.
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 } } }
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;
25 } }
27 std::tr1::X1<int> x1i; // expected-note{{in instantiation}}