111
|
1 // { dg-do compile }
|
|
2
|
|
3 // Copyright (C) 2003 Free Software Foundation, Inc.
|
|
4 // Contributed by Nathan Sidwell 3 Jul 2003 <nathan@codesourcery.com>
|
|
5
|
|
6 // PR c++ 9162. default args got left unprocessed
|
|
7
|
|
8 struct S {
|
|
9 friend int foo (const S&, int = 100);
|
|
10 };
|
|
11 S s;
|
|
12 int i = foo (s);
|
|
13
|
|
14 struct R
|
|
15 {
|
|
16 template <typename T> R (T, int = 0);
|
|
17 };
|
|
18
|
|
19 int Foo ()
|
|
20 {
|
|
21 R s (1);
|
|
22 }
|
|
23
|
|
24 template <typename T> struct Q
|
|
25 {
|
|
26 int Foo (T, int = 0);
|
|
27 };
|
|
28
|
|
29 int Foo (Q<int> *s)
|
|
30 {
|
|
31 s->Foo (1);
|
|
32 }
|