C++ Logo


Advanced search

Subject: Re: [std-proposals] Guaranteeing more object contiguity
From: Gašper Ažman (gasper.azman_at_[hidden])
Date: 2019-11-13 13:23:12

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)).


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

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups