C++ Logo

std-proposals

Advanced search

Re: [std-proposals] sizeof lambda in an unevaluated context

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Tue, 25 Jun 2024 11:19:58 +0000
Why?
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]>
Sent: Tuesday, June 25, 2024 12:23:35 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Subject: Re: [std-proposals] sizeof lambda in an unevaluated context

On Tue, Jun 25, 2024 at 1:07 AM Thiago Macieira wrote:
>
> No, I don't think it's necessary. Because they are different closure types,
> anyone using them must be prepared to deal with types that may have different
> captures so it doesn't matter whether they have the same size and alignment or
> not. The rules above add unnecessary complexity to the standard.


Do you not at least think that the following program should print the
same number out twice?

    https://godbolt.org/z/WTvfKb3dr

It prints 1 for the first size, and 72 for the second size. Do you
think that's okay? Or should it be fixed?
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-06-25 11:20:04