This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: injection of methods & overloading


Brendan Kehoe <brendan@cygnus.com> writes:
> Here's an example where the injection of a method from a namespace (class) is
> colliding, even though they have different signatures in terms of their
> argument types.
> 
> -- cut --
> class foo {
>         public:
>                 int fn( int i ) { return i == 0 ? 0 : 1 ; }
> } j;
> 
> class bar: public foo {
>         using foo::fn;
>         int fn( ) { return fn(1); }
> } s;
> -- cut --

This is not related to the namespace implementation; class-level
using-directives are implemented elsewhere. As Jason points out, this
is still the ARM-style access declaration, so it needs to be reworked
for ISO C++.

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]