Debian Codegraph @

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

raw
1 // { dg-do assemble }
2
3 template <int I>
4 struct S {};
5
6 template <int J>
7 void foo(S<J - 1>);
8
9 template <class T>
10 void baz(S<sizeof(T)>);
11
12 template <int J>
13 void fun(S<J>, S<J * 2>);
14
15 void bar()
16 {
17 foo<5>(S<4>()); // OK - 4 is 5 - 1.
18 baz<int>(S<sizeof(int)>()); // OK
19 fun(S<4>(), S<8>()); // OK - deduce J from first argument.
20 }