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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [overload2.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Core 1321
2
// { dg-options -std=c++0x }
3
// Two dependent names are equivalent even if the overload sets found by
4
// phase 1 lookup are different.  Merging them keeps the earlier set.
5
 
6
int g1(int);
7
template  decltype(g1(T())) f1();
8
int g1();
9
template  decltype(g1(T())) f1()
10
{ return g1(T()); }
11
int i1 = f1();      // OK, g1(int) was declared before the first f1
12
 
13
template  decltype(g2(T())) f2();
14
int g2(int);
15
template  decltype(g2(T())) f2() // { dg-error "g2. was not declared" }
16
{ return g2(T()); }
17
int i2 = f2();                    // { dg-error "no match" }
18
 
19
int g3();
20
template  decltype(g3(T())) f3();
21
int g3(int);
22
template  decltype(g3(T())) f3() // { dg-error "too many arguments" }
23
{ return g3(T()); }
24
int i3 = f3();                    // { dg-error "no match" }

powered by: WebSVN 2.1.0

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