Boost logo

Boost :

From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2005-10-12 16:28:23

Hi Doug,

On Wed, Oct 12, 2005 at 01:43:36PM -0500, Doug Gregor <dgregor_at_[hidden]> wrote:
> > I dont see why any_cast is used here at all. The type safety
> > is guranteed by the interface of Boost.Signals, so I doubt that
> > someone will be able to abuse the library. I believe the author
> > of that code had the same in mind, since he did not test
> > target != 0 before invoking the target. So in my opinion a
> > simple reinterpret_cast should suffice here. It would also
> > fix our issue, although that one is caused by gcc.
> You're right. Our options are:
> 1) Fix any_cast to compare typeid().name() instead of type_info
> objects
> 2) Make an unsafe_any_cast that doesn't do the check
> 3) Switch signals to use void*'s
> For 1.33.1, I like #2 best because it affects the least amount of code.
> For 1.34.0 and beyond, #1 is probably our best bet so that others don't
> run into the same problem.

Hm #1 does not sound good, it would make the cast even slower. I
do not see a reason for dynamic typing here at all. #3 sounds good to

Andreas Pokorny

Boost list run by bdawes at, gregod at, cpdaniel at, john at