Bug 17597 – std.typecons.Typedef cannot be instantiated with void

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-05T10:42:27Z
Last change time
2024-12-01T16:30:30Z
Assigned to
No Owner
Creator
RazvanN
Moved to GitHub: phobos#10255 →

Comments

Comment #0 by razvan.nitu1305 — 2017-07-05T10:42:27Z
I want to create a typedef from void : alias MyVoid = Typedef!void; When I try to compile the code, it fails with the error message: std/typecons.d(6328): Error: void does not have a default initializer That may be so, but I should be able to create a Typedef anyway. I think that the best way to go here is to make the init null for types that do not have init values. This is currently blocking [1] due to the fact that an alias to void is used instead of a typedef. [1] https://issues.dlang.org/show_bug.cgi?id=16735
Comment #1 by bugzilla — 2019-12-22T07:34:56Z
IMHO void isn't considered a type (according to the docs) and there is not supposed to work with Typedef, so I think, this is more an enhancement request than a bug report.
Comment #2 by robert.schadek — 2024-12-01T16:30:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10255 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB