Boost logo

Boost :

Subject: Re: [boost] [next gen future-promise] What to call the monadic return type?
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2015-05-26 11:28:45


On Tue, May 26, 2015 at 3:08 AM, Niall Douglas
<s_sourceforge_at_[hidden]> wrote:
>
>> - _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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk