April 14, 2017 [Issue 17325] New: alias this not tried on template instantiation failure | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17325 Issue ID: 17325 Summary: alias this not tried on template instantiation failure Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: qs.il.paperinik@gmail.com struct Array { int[] arr; alias arr this; } void main() { import std.algorithm : sort, SwapStrategy; Array a; sort(a); // fails sort!("a < b", SwapStrategy.unstable, int[])(a); // works sort(a.arr); // works } This is a major limitation for writing wrappers. -- |
Copyright © 1999-2021 by the D Language Foundation