|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-09-22 16:12:08
On Sunday 22 September 2002 11:29 am, Thomas Witt wrote:
> Doug,
>
> the current implementation of bound_objects_visitor contains a bug. It
> fails to correctly handle bound objects that are based on ptrs to function.
[snip Doug's broken code]
> What happens is that is_pointer<T> evaluates to true for function ptrs.
> maybe_get_pointer in turn calls add_if_trackable with a function pointer
> argument. This triggers an no such instance of overloaded function accepts
> argument list error as function ptrs are not convertible to void*.
>
> So far I can't come up with an easy and portable fix.
Thanks for catching this. I've added a testcase for it, and committed a fix
that _should_ be portable (about to test MSVC6...) to both the branch and
trunk.
Looks like addressof() is also broken for function pointers...
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk