C++ Logo

std-proposals

Advanced search

Re: Guaranteeing more object contiguity

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Wed, 13 Nov 2019 19:23:12 +0000
So your thesis is effectively that we should strike "required" and
substitute "used" in

When [sizeof is] applied to a class, the result is the number of bytes in
an object of that class including any
padding <del>required</del><ins>used</ins> for placing objects of that type
in an array.

?

That's a very small wording change :). Though, I think you are misreading
that paragraph. In your example, sizeof(A | _ | B) would be 3, because
that's the number of bytes in that object - while sizeof( A | _ | B | _ )
would be 4 (this results from alignof(2)).

G

On Tue, Oct 22, 2019 at 4:00 AM Krystian Stasiowski via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Hi all,
>
> Attached is a draft of my paper that addresses objects occupying
> contiguous memory. Any kind of review would be much appreciated.
>
> Thank you,
> Krystian Stasiowski
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2019-11-13 13:25:43