Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag of a single-type SumType wastes space #10563

Open
dlangBugzillaToGithub opened this issue Oct 15, 2024 · 0 comments
Open

Tag of a single-type SumType wastes space #10563

dlangBugzillaToGithub opened this issue Oct 15, 2024 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

maxsamukha (@maxsamukha) reported this on 2024-10-15T12:47:15Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=24818

Description

import std.sumtype;

static assert(SumType!int.sizeof == 4);
----
Error: static assert:  `8LU == 4LU` is false

No need to store a tag for such SumTypes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants