[Issue 7308] New: Lambda template literals
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 17 17:10:55 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7308
Summary: Lambda template literals
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-01-17 17:10:54 PST ---
Currently (DMD 2.058head) this kind of code is not allowed, but I think it's
handy to have (I suggest to require the () around the lambda template):
void main() {
alias (x => x ^^ 2) sqrTemplate;
}
Timon Gehr reminds me that the semantics of that code is already available,
just with a longer syntax:
template ID(alias a){alias a ID;}
void main(){
alias ID!(x => x ^^ 2) sqrTemplate;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list