OSDN Git Service

PR c++/13520
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / qualttp22.C
1 // { dg-do compile }
2
3 // Origin: Philippe Van Deyck <hetadres@email.com>
4
5 // PR c++/13520: Default template template argument that is a qualified id
6 // with dependent scope.
7
8 template<typename regular_type> class Policy {};
9
10 template <typename regular_type, template<typename> class OriginalPolicy>
11 class ChangedPolicy_impl {};
12
13 template <template<typename> class OriginalPolicy > class ChangedPolicy {
14 public:
15   template<typename regular_type> class Type : public 
16   ChangedPolicy_impl<regular_type,OriginalPolicy> { };
17 };
18
19 template <typename regular_type, template<typename> class Policy1,
20           template<typename> class Policy2
21             = ChangedPolicy<Policy1>::template Type>
22 class Host : public Policy1<regular_type>, public Policy2<regular_type> { };
23
24 int main()
25 {
26   Host<void, Policy> h;
27   return 0;
28 }