
18 Dec
2009
18 Dec
'09
9:11 p.m.
Felipe Magno de Almeida wrote:
IMO we should be using static_cast<T2*>(static_cast<void*>(x)) which is not implementation-defined.
This is, by the way, what optional does. Apparently, it isn't enough to avoid the warning. And it's really frustrating too. I use optional from the trunk for simple things in a small test program, and get no warnings at all even in programs where I do stupid programming tricks to get gcc to winge about strict aliasing on other lines so that I know I have the compile
Peter Dimov wrote: options right. I can't get gcc to complain about optional in my program at all, even trying different values of -Wstrict-aliasing, but building boost-trunk I see it. Patrick