Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2000-11-20 14:15:42


--- In boost_at_[hidden], Douglas Gregor <gregod_at_r...> wrote:
> On Mon, 20 Nov 2000 16:51:19 -0000
> "William Kempf" <sirwillard_at_m...> wrote:
>
> [snip]
> > > > (This is one of the things the really confused people in
SigC,
> > there
> > > > are multiple formulations there to cover the bad case
compilers.
> > It
> > > > makes for reams of code which just gets skipped on most
> > compilers.)
> > >
> > > After uploading the newest version of the callback library
> > yesterday I was lamenting the ugliness of the resulting code. As
> > careful as I was, the VC++ hacks have produced almost illegible
> > source from reasonably simple code.
> >
> > It doesn't seem that bad to me (at least at the public interface
> > level... I've yet to look in the ::detail sub-namespace).
> > Unfortunately, portable code will often have ugly warts, and this
is
> > made worse by non-conforming or buggy compilers. However, you've
> > done a good job of hiding the ugliness from the user.
>
> This will change somewhat, because callback should really inherit
from a callback_impl which is specialized based on the number of
parameters (just like function_callback_impl in
details/callback.hpp). Otherwise, we have extranneous, unusable
operator() overloads in the main callback class.

The extraneous operator() overloads will never be instantiated and so
never effect code size. I don't think there's a good reason for
deriving callback from callback_impl.

In any event, the ugliness is still hidden.

Bill Kempf


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