digitalmars.D.bugs - [Issue 16617] New: toHash can not be a template method
- via Digitalmars-d-bugs (23/23) Oct 16 2016 https://issues.dlang.org/show_bug.cgi?id=16617
https://issues.dlang.org/show_bug.cgi?id=16617 Issue ID: 16617 Summary: toHash can not be a template method Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ilyayaroshenko gmail.com Making toHash method a template can significantly reduce template bloat for ndslices. In the same time language DMD FE does not allow to do it because, for example, the following toHash declaration is not recognised as toHash method: struct S { uint s; size_t toHash()() { return s; } // does not work :-( } --
Oct 16 2016