C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::sizeof_minus_trailing_padding

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Fri, 1 Dec 2023 09:03:45 +0000
On Thu, Nov 30, 2023 at 10:29 PM Arthur O'Dwyer wrote:
>
> No. Let's see it get into more than one compiler, first; and also get some usage experience in practice.
> So far, as far as practical uses are concerned, I'm only aware of the std::copy/std::move/std::swap_ranges family; and the current debacle with std::expected in libc++. And the latter shouldn't count as we never should have got into that situation to begin with.


I've changed my previous code example to use __datasizeof and it
compiles on GodBolt using the trunk version of clang++:

    https://godbolt.org/z/dG5hfj5We

I don't see why the committee would need to see this in a few
compilers before determining that what I've done in the above Godbolt
is useful.

Received on 2023-12-01 09:03:57