Boost logo

Boost :

Subject: Re: [boost] [function] Placement new warnings from gcc 6
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-04-04 23:39:41


On 4/04/2016 19:52, Andrey Semashev wrote:
> On 2016-04-04 04:35, Gavin Lambert wrote:
>> Could you do this with an anonymous union? eg:
>>
>> union function_buffer
>> {
>> mutable union function_buffer_members
>> {
>> ...
>> };
>> mutable char data[sizeof(function_buffer_members)];
>> };
>>
>> Haven't tested this; not sure if it's legal to get the sizeof a subtype
>> nested in the same scope like this, but it at least seems plausible.
>
> That is a named union in your example. And if it's anonymous then you
> have no name to apply sizeof to.

Type name != member name. It is still an anonymous union.


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