|
Boost Users : |
Subject: Re: [Boost-users] function_base.hpp type-punned pointer warnings
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-03-10 11:59:35
"KSpam" wrote:
> This has been a known problem for a very long time, and the work around is
> quite simple. Replace
>
> reinterpret_cast<functor_type*>(&in_buffer.data)->~Functor();
>
> with
>
> functor_type* p = reinterpret_cast<functor_type*>(&in_buffer.data);
> p->~Functor();
Note however that this replacement causes a warning on MSVC ('p' not used),
so it needs to be conditional, as in
https://svn.boost.org/trac/boost/changeset/69251
Is there a ticket?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net