blob: bafdadb9429f6e27e35244bf4f8e2c3593d127eb (
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
29
30
31
32
|
// { dg-do compile }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 3 Jul 2003 <nathan@codesourcery.com>
// PR c++ 9162. default args got left unprocessed
struct S {
friend int foo (const S&, int = 100);
};
S s;
int i = foo (s);
struct R
{
template <typename T> R (T, int = 0);
};
int Foo ()
{
R s (1);
}
template <typename T> struct Q
{
int Foo (T, int = 0);
};
int Foo (Q<int> *s)
{
s->Foo (1);
}
|