January 09, 2023 [Issue 23610] std.typecons.Typedef doesn't forward constructors | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23610 --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> --- For anyone else who just wants to "get things done", I use this sort of workaround: ----- private struct Vec3(size_t line = __LINE__) { ... } // Type aliases for Vec3 public alias Point3 = Vec3!(); // 3D point public alias Color = Vec3!(); // RGB color ----- So at least that gives you some type safety. And that only works for your own user-defined types. But you could use alias this tricks to wrap existing types. Maybe Typedef does something like this under the hood. But it's so incomplete it's a pain to use. -- |
January 09, 2023 [Issue 23610] std.typecons.Typedef doesn't forward constructors | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23610 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
Copyright © 1999-2021 by the D Language Foundation