Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2000-11-20 16:10:38


On Mon, 20 Nov 2000 19:15:42 -0000
"William Kempf" <sirwillard_at_[hidden]> wrote:
[snip]
> > 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.

The extra operator() overloads confuse the interface, though, and have no meaning. If a user attempts to pass an incorrect number of arguments to operator(), we'd prefer to have the error show up in the callback class instead of in one of the implementation classes from boost::detail.

        Doug Gregor


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