summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/qualttp22.C
blob: 21aa7568d902bf5c768289c69166cff03175f3b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do compile }

// Origin: Philippe Van Deyck <hetadres@email.com>

// PR c++/13520: Default template template argument that is a qualified id
// with dependent scope.

template<typename regular_type> class Policy {};

template <typename regular_type, template<typename> class OriginalPolicy>
class ChangedPolicy_impl {};

template <template<typename> class OriginalPolicy > class ChangedPolicy {
public:
  template<typename regular_type> class Type : public 
  ChangedPolicy_impl<regular_type,OriginalPolicy> { };
};

template <typename regular_type, template<typename> class Policy1,
	  template<typename> class Policy2
	    = ChangedPolicy<Policy1>::template Type>
class Host : public Policy1<regular_type>, public Policy2<regular_type> { };

int main()
{
  Host<void, Policy> h;
  return 0;
}