|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-05-23 08:12:53
On Thursday 23 May 2002 08:11 am, Yitzhak Sapir wrote:
> This works with my compiler MSVC6.5 using the just released 1.28 library.
> We haven't moved to it yet though. In the older version library it doesn't
> work though.
FWIW, the feature was added in version 1.27.0.
> I'm still somewhat interested in whether pointers to functors are useful.
> But I suppose it's less important if I can use boost::ref.
Pointers to function objects aren't supported because for a pointer to
function object fp, you can't just write fp(...) to call the pointee.
Basically, a pointer to function object is not itself a function object.
There's also a technical reason. If raw pointers are supported, smart pointers
of all shapes and kinds should also be supported. So we either need more
traits (e.g., pointer_traits) to determine if an arbitrary type is a pointer
vs. a function object, and eventually it's so much work for the user that she
might as well just write ref(*this).
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk