On Monday, August 27, 2012 20:18:34 Michael Pyne wrote: > On Tuesday, August 28, 2012 00:41:16 Thiago Macieira wrote: > > On segunda-feira, 27 de agosto de 2012 18.20.15, Michael Pyne wrote: > > > > Please use the Qt atomic types. Until GCC 4.7, they generate better > > > > code. > > > > > > I agree, the reason it wasn't that way initially is mentioned in the > > > discussion on the bug (but basically because you can't simply put > > > QBasicAtomicInt in the union used to store the different lock types that > > > are possible). > > > > Why not? > > > > QBasicAtomicInt are permitted in unions. Besides, why do you want it in a > > union in the first place? You should not access the data that it holds > > *except* via the QBasicAtomicInt functions. > > That would be the idea, yes (to use the public QBAI functions). > > The problem with having it in a union was that it's a non-POD type according > to C++ 03 rules (or at least, that seemed to be the issue when I had tried > that initially).
Actually I take that back. I was using QAtomicInt, which had that problem. QBasicAtomicInt works just fine in the union... yay! Regards, - Michael Pyne
signature.asc
Description: This is a digitally signed message part.