Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-06-12 14:45:25


On Wednesday 12 June 2002 03:18 pm, Fernando Cacciola wrote:
> > The important part is the 'using derived::check', which ties together all
of
> > the overloads. I don't know how (practically) portable this is: GCC 3.x
> > handles it fine, but GCC 2.95.x does not.
> >
> Interesting: I tried it and it didn't work with BCB5. It ICEs right in the
> using declaration.

What a pain.

> But, fortunately, it is not required! As long as the inheritance is public
> there is no need to bring each 'check' up-front.
> It works fine if the 'using' declaration is removed.

Without the using declaration, the 'check' functions should name-hide the
check functions from the base class. The example doesn't show the problem
(because char is convertible to int), but it won't work if another type is
used (e.g., replace 'char' with 'std::string' and change 'c' to "c").

        Doug


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