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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [koenig5.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do assemble  }
2
// To find function pointers in Koenig lookup is ok as long as we only find one.
3
namespace A{
4
  void foo();
5
  struct X{};
6
  void (*bar)(X*)=0;
7
}
8
using A::X;
9
 
10
void (*foo)(X*)=0;
11
 
12
void g()
13
{
14
  foo(new X);            // ok -- DR 218 says that we find the global
15
                         // foo variable first, and therefore do not
16
                         // perform argument-dependent lookup.
17
  bar(new X);            // ok
18
}

powered by: WebSVN 2.1.0

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