blob: fc9357964f497215c211aa968d7245ad8d7722d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// { dg-do assemble }
// GROUPS passed arg-matching
// From: gustavo@cpqd.br (Gustavo Chaves)
// Date: Wed, 25 May 94 09:38:00 EST
// Subject: problem with user defined conversions in initialization
// Message-ID: <9405251238.AA19815@moon.cpqd.br>
struct String { String(const char*); };
struct Ack { Ack(String); };
struct S { void method(Ack); }; // { dg-message "S::method|no known conversion" } referenced below
void function(Ack);
int
foo(S *o)
{ // Neither call has a usable constructor for conversions of char[5] to Ack.
function("adsf");// { dg-error "could not convert" }
o->method("adsf");// { dg-error "no matching" }
// { dg-message "candidate" "candidate note" { target *-*-* } 20 }
return 0;
}
|