Commit dfa9dde4 by Mark Mitchell Committed by Kazu Hirata

ctor6.C, [...]: New.

	* g++.dg/parse/ctor6.C, g++.dg/parse/defarg11.C,
	g++.dg/template/friend42.C, g++.dg/template/spec30.C: New.

Co-Authored-By: Kazu Hirata <kazu@codesourcery.com>

From-SVN: r114585
parent ff8fe3e0
2006-06-12 Mark Mitchell <mark@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
* g++.dg/parse/ctor6.C, g++.dg/parse/defarg11.C,
g++.dg/template/friend42.C, g++.dg/template/spec30.C: New.
2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27933
// { dg-do compile }
// There is no ambiguity in finding a right constructor for X b(a).
class X {
public:
X(const X&, int = 3);
};
extern X a;
X b(a);
// { dg-do compile }
// { dg-options "-pedantic" }
class foo {
public:
void operator& (int = 1); // { dg-error "default argument" }
void operator++ (int = 2); // { dg-error "default argument" }
void operator-- (int = 3); // { dg-error "default argument" }
};
// { dg-do compile }
template <class T> void foo (int);
template <class T>
class Q {
friend void foo<T> (int = 3); // { dg-error "default argument" }
};
// { dg-do compile }
template<int N>
inline int
foo (int a)
{
return a;
}
template<>
inline int
foo<0> (int a = 123) // { dg-error "default argument" }
{
return a + 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment