Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
April 13, 2013 [Issue 9929] New: Need 'this' when calling template with expanded tuple | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9929 Summary: Need 'this' when calling template with expanded tuple Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-04-13 11:20:56 PDT --- Found when implementing fix for Issue 7666: import std.typecons; import std.typetuple; auto reverse(T)(T t) if (isTuple!T) { return tuple(Reverse!(t.expand)); // fail auto x = t.expand; // workaround return tuple(Reverse!(x)); // ok } void main() { auto tup = tuple(1, "2"); reverse(tup); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 13, 2013 [Issue 9929] Need 'this' when calling template with expanded tuple | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=9929 timon.gehr@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr@gmx.ch --- Comment #1 from timon.gehr@gmx.ch 2013-04-13 13:57:23 PDT --- This issue is not specific to tuples. struct S{ int x; } template ID(alias T){ alias T ID; } auto foo(){ S s; auto a = ID!(s.x); // error auto x = s.x; auto b = ID!x; // ok } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 13, 2013 [Issue 9929] Need 'this' when accessing field passed per alias | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=9929 timon.gehr@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Need 'this' when calling |Need 'this' when accessing |template with expanded |field passed per alias |tuple | Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 13, 2013 [Issue 9929] Need 'this' when accessing field passed per alias | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=9929 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-04-13 14:08:20 PDT --- Pretty sure that this is then a dupe of Issue 6842. *** This issue has been marked as a duplicate of issue 6842 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation