repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* arm.c (FL_WBUF): Define.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ns
/
overload1.C
blob
d177e02bbf2f2d4be3797248a3885cf512bc956c
1
// { dg-do run }
2
// Unqualified lookup should find all functions.
3
// Duplicates are ignored as long as they lose during overload resolution.
4
namespace A{
5
int f(){
6
return 1;
7
}
8
int f(double);
9
}
10
namespace B{
11
int f(int){
12
return 2;
13
}
14
int f(double);
15
}
16
17
int f(int,int)
18
{
19
return 3;
20
}
21
22
using namespace A;
23
using namespace B;
24
25
int main()
26
{
27
if(f() != 1)
28
return 1;
29
if(f(1) != 2)
30
return 1;
31
if(f(0,0) != 3)
32
return 1;
33
return 0;
34
}