Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2002-07-19 00:38:51


On Wed, 17 Jul 2002 08:16:06 -0400, Douglas Gregor wrote:

> I'm not sure the macro name is appropriate, because at least on GCC
2.99.3 the
> problem is unrelated to templates. Removing all of the templates from
the
> example, GCC 2.95.3 emits the error:
>
> cannot adjust access to `static void test_base::f()' in `struct
test_using'
> because of local method `static double test_using::f(double)' with
same name
>
> The problem is that it can't overload a name introduced in the class
and
> brought in via a using declaration. Maybe
> BOOST_NO_USING_DECLARATION_OVERLOADS?

Good name.

> (I didn't check the reason for the failure on MSVC)

Yes, MSVC is from where my proposal originated... Its behavior is
slightly different from GCC.

So I guess what we really need are two macros:
 * BOOST_NO_USING_DECLARATION_OVERLOADS
 * BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE (long ugly
name -- any suggestions?)

I've attached test files; someone else might want to check them out,
however.

And to answer John Maddock's question: this is needed (in more ways than
one) by the Boost.Variant library under development by Itay Maman and
me.

Thanks,
Eric





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk