comparison gcc/testsuite/g++.dg/parse/defarg4.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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 }