OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [overload/] [ambig1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// [over.best.ics]: For the purpose of ranking implicit conversion
2
// sequences as described in _over.ics.rank_, the ambiguous conversion
3
// sequence is treated as a user-defined sequence that is indistinguishable
4
// from any other user- defined conversion sequence.
5
 
6
struct A
7
{
8
  A(long);
9
  A(char);
10
};
11
 
12
struct B
13
{
14
  B(int);
15
};
16
 
17
void f(A);                      // { dg-error "" "candidate" }
18
void f(B);                      // { dg-error "" "candidate" }
19
 
20
int main()
21
{
22
  f (42);                       // { dg-error "ambiguous" "ambiguous" }
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.