digitalmars.D.learn - Make struct transparent to std.algorithm.sort
- cal (14/14) Feb 19 2013 Is there a way to make this sort of thing work?
Is there a way to make this sort of thing work? import std.algorithm; struct S { int[] arr; alias arr this; } void main() { auto s = S([1,2,3]); sort(s); // error: template std.algorithm.sort does not match any function // template declaration. Candidates are... }
Feb 19 2013