[Issue 16617] New: toHash can not be a template method
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 16 03:34:55 PDT 2016
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 at puremagic.com
Reporter: ilyayaroshenko at 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 :-(
}
--
More information about the Digitalmars-d-bugs
mailing list