26 May
2015
26 May
'15
3:28 p.m.
On Tue, May 26, 2015 at 3:08 AM, Niall Douglas
- _lock_buffer isn't aligned, should use a union or aligned_storage or something.
I believe this doesn't matter on any major architecture as it will always be four byte aligned thanks to compiler padding.
I'm surprised that this is the response. Why would you not write an "alignas(alignof(spinlock<bool>))" for _lock_buffer (or use aligned_storage, as Avi suggested, and have correct C++ code, instead of "probably correct C++ code depending on implementation"? Is this code not part of what you intend to submit for inclusion in Boost? Glen