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: [email protected]
Reporter: [email protected]
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 :-(
}
--