Boost logo

Boost :

Subject: Re: [boost] [config] RFC PR 82
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-11-25 20:52:54


On Wed, Nov 25, 2015 at 7:25 PM, Agustín K-ballo Bergé
<kaballo86_at_[hidden]> wrote:
> On 11/25/2015 12:46 PM, Andrey Semashev wrote:
>> On 2015-11-25 18:32, Alexander Lauser wrote:
>>>
>>> http://en.cppreference.com/w/cpp/language/union have an example that
>>> explicitly states what Gavin claimed. Not sure about the reliability
>>> of that site, though.
>>
>> That sounds like self contradiction to me. The page says it's well
>> defined to examine the common subsequence of standard-layout union
>> members but at the same time it's UB to read from them. What's the
>> difference?
>
> The wording is convoluted, maybe it becomes clearer with some examples.

I see, thank you for the clarification. IMHO, the standard should just
follow C11 semantics and say it more clearly.

Regarding the original topic and the proposed Boost.Config macro for
detection of this compiler feature, I'm still not sure we need it,
although now I'm not as strongly convinced.


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