Bug 24818 – Tag of a single-type SumType wastes space

Status
NEW
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2024-10-15T12:47:15Z
Last change time
2024-12-01T16:43:04Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: phobos#10563 →

Comments

Comment #0 by maxsamukha — 2024-10-15T12:47:15Z
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.
Comment #1 by robert.schadek — 2024-12-01T16:43:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10563 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB