[Issue 23610] New: std.typecons.Typedef doesn't forward constructors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 9 12:56:41 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23610
Issue ID: 23610
Summary: std.typecons.Typedef doesn't forward constructors
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: andrej.mitrovich at gmail.com
-----
import std.typecons;
struct Vec {
this(int, int, int) {
}
}
void main() {
auto v1 = Vec(1, 2, 3); // ok
alias TVec = Typedef!Vec;
auto v2 = TVec(1, 2, 3); // error
}
-----
$ dmd test.d
> test.d(13): Error: none of the overloads of `this` are callable using argument types `(int, int, int)`
--
More information about the Digitalmars-d-bugs
mailing list