RE: [boost] Re: 1.31.0 release candidate 3

From: Douglas Paul Gregor [mailto:gregod@cs.rpi.edu]
Thanks to everyone who has tried this. So it looks like it might be an optimizer bug (did anyone else try with optimization on?). This probably isn't a showstopper bug if it is an optimizer problem (especially if one needs particularly high optimization settings to trigger it). I'll try to work around this problem tonight, but it won't make 1.31.0.
I've managed (pun intended) to reproduce the problem when compiling with /CLR (compiles to managed code). The cause is this overloaded function: namespace detail { namespace function { inline bool has_empty_target(...) { return false; } } } When this function is called in assign_to (upon construction of the boost::function), the returned result is true (!), which means that the perfectly valid function (object) is never assigned, and the boost::function is thus empty. Oops... One way around this compiler bug is to avoid the ellipsis function, changing the signature of has_empty_target to: namespace detail { namespace function { inline bool has_empty_target(const void* f) { return false; } } } Cheers, Bjorn Karlsson
participants (1)
-
Bjorn.Karlsson@readsoft.com