blob: d177e02bbf2f2d4be3797248a3885cf512bc956c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// { dg-do run }
// Unqualified lookup should find all functions.
// Duplicates are ignored as long as they lose during overload resolution.
namespace A{
int f(){
return 1;
}
int f(double);
}
namespace B{
int f(int){
return 2;
}
int f(double);
}
int f(int,int)
{
return 3;
}
using namespace A;
using namespace B;
int main()
{
if(f() != 1)
return 1;
if(f(1) != 2)
return 1;
if(f(0,0) != 3)
return 1;
return 0;
}
|