|
Boost : |
Subject: Re: [boost] [atomic] Structs with default constructor
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-07-07 07:29:57
On Monday 07 July 2014 09:38:11 Marcel Raad wrote:
> Boost.Atomic 1.55 accepted structs with a user-defined default constructor
> as template argument, the version from the 1.56 test build doesn't (because
> of the union_cast). Is this by design? I could be wrong, but I thought the
> only requirement for structs to use them in atomics was that they were
> trivially coyable.
Yes, this is the property of the current implementation. The type has to be
trivial (3.9/9). The previous versions compiled with types with non-trivial
default constructors but the constructors were not actually called.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk