Commit 8ffc2e37 by Giovanni Bajo Committed by Bernardo Innocenti

re PR c++/2294 (using declaration confusion)

        PR c++/2294
        * g++.dg/lookup/using9.c: New test.

From-SVN: r73621
parent 584fb00b
2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2294
* g++.dg/lookup/using9.c: New test.
2003-11-14 Mark Mitchell <mark@codesourcery.com>
PR c++/12762
......
// { dg-do compile }
// Origin: C++ Standard Draft (7.3.3/12)
// PR c++/2294: using declarations should not conflict, but only cause
// an ambiguous overload set to be created.
namespace B {
void f(int); // { dg-error "note" }
void f(double); // { dg-error "note" }
}
namespace C {
void f(int); // { dg-error "note" }
void f(double); // { dg-error "note" }
void f(char); // { dg-error "note" }
}
void h()
{
using B::f;
using C::f;
f('h');
f(1); // { dg-error "ambiguous" }
void f(int); // { dg-error "previous using declaration" }
}
void m()
{
void f(int);
using B::f; // { dg-error "already declared" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment