digitalmars.D.bugs - [Issue 8968] New: std.traits.ParameterIdentifierTuple is undocumented and doesn't work with ref params
- d-bugmail puremagic.com (31/31) Nov 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8968
- d-bugmail puremagic.com (11/11) Nov 14 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8968
- d-bugmail puremagic.com (12/12) Nov 14 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8968
http://d.puremagic.com/issues/show_bug.cgi?id=8968 Summary: std.traits.ParameterIdentifierTuple is undocumented and doesn't work with ref params Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-11-06 10:18:54 PST --- import std.traits; void foo(ref int x) { } void main() { alias ParameterIdentifierTuple!foo x; } D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\traits.d(518): Error: function literal __lambda16 (ref int x) is not callable using argument types (int) It tries to use a clever trick by defining an inner lambda with a parameter list, and then extracts the name from that. But it can't call a lambda with a ref parameter at compile-time. Honestly we should just have a simple __trait that returns the parameter identifiers, because this is a very hacky workaround that doesn't work in all cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8968 Ellery Newcomer <ellery-newcomer utulsa.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ellery-newcomer utulsa.edu --- Comment #1 from Ellery Newcomer <ellery-newcomer utulsa.edu> 2012-11-14 17:38:58 PST --- its documented now https://github.com/D-Programming-Language/phobos/pull/946 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 14 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8968 Ellery Newcomer <ellery-newcomer utulsa.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Ellery Newcomer <ellery-newcomer utulsa.edu> 2012-11-14 17:57:25 PST --- and evidently does work with ref int now: https://github.com/D-Programming-Language/phobos/commit/49cbab43c2bdf5d14d51d869c62e010befa3bcab -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 14 2012