www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17597] New: std.typecons.Typedef cannot be instantiated with


          Issue ID: 17597
           Summary: std.typecons.Typedef cannot be instantiated with void
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: razvan.nitu1305 gmail.com

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

Jul 05 2017