D needs a type expression syntax

Joao Lourenço jlourenco5691 at gmail.com
Fri May 12 18:56:12 UTC 2023


It also says:

> 2. Structs with no fields of non-zero size (aka *Empty Structs*) have a
size of one byte.

On Fri, May 12, 2023, 7:01 PM Nick Treleaven via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Thursday, 11 May 2023 at 13:51:28 UTC, Dukc wrote:
> > `sizeof(Tuple!()) == 1`. I'm not sure why.
>
> The spec says `sizeof` for an empty struct is implementation
> defined:
> https://dlang.org/spec/struct.html#struct_layout
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20230512/20d1bd31/attachment.htm>


More information about the Digitalmars-d mailing list