Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/parms2.C

raw
1 // { dg-do assemble }
2 //
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 5 Sept 2000 <[email protected]>
5
6 // bug 73. We failed to compare explicit arguments for a TEMPLATE_ID_EXPR in a
7 // TYPENAME_TYPE.
8
9 struct Plus {
10 template <class T>
11 struct Sig { typedef int Third;};
12 };
13
14
15 template <class T>
16 struct Ethel {
17 typedef int WrappedType;
18 };
19
20 struct Fred {
21
22 template <class Q, class LA, class LB>
23 Ethel<typename Q::template Sig<typename LA::WrappedType>::Third> baz ();
24
25
26 template <class Z, class A, class B>
27 Ethel<typename Z::template Sig<A>::Third>
28 foo ( const Z&, const Ethel<A>&, const Ethel<B>&) const;
29 };
30
31 int main() {
32 Fred f;
33 Ethel<int> e;
34 Plus p;
35
36 f.foo (p, e, e);
37
38 return 0;
39 }