From: Jesse Jones (jejones_at_[hidden])
Date: 2000-11-22 17:38:52
>In message <firstname.lastname@example.org>, Jesse Jones
>>I've uploaded a new version of my callback classes (see the Callbacks2
>>directory in the vault). Like Doug Gregor's this version has the nice
>>property of not requiring clients to encode the number of arguments in the
>>callback class name.
>I might be missing something, but why is this a nice property? It seems
>to open up the possibility of runtime errors
Hmm, you're right: too many arguments give you a compile time error, but
too few give you the runtime error. ick :-)
>and require that all result
>types are default constructible.
We can get rid of this by casting NULL to a RETURN_TYPE* and dereferencing
it. It'll crash, but that's not such a bad thing considering what the user
is trying to do.
>As another point, is there a reason that pointers are restricted to raw
>pointers? This restriction is not necessary -- see http://www.cuj.com/ex
>perts/1811/henney_x.html which allows other smart object pointers.
I'm not sure what you mean here. Functor objects are supported. The only
raw pointers are for member functions and there's doubt as to whethe they
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk