This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: injection of methods & overloading
- To: brendan at cygnus dot com
- Subject: Re: injection of methods & overloading
- From: "Martin v. Loewis" <loewis at informatik dot hu-berlin dot de>
- Date: Tue, 2 Jun 1998 16:00:59 +0200
- Cc: egcs-bugs at cygnus dot com
- References: <8641.896744349@lisa.cygnus.com>
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