January 30, 2010 [Issue 3756] New: std.traits.ReturnType broken for ref returns | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3756 Summary: std.traits.ReturnType broken for ref returns Product: D Version: 2.040 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: dsimcha@yahoo.com --- Comment #0 from David Simcha <dsimcha@yahoo.com> 2010-01-30 15:54:58 PST --- import std.traits; ref uint foo(ref uint num) { return num; } pragma(msg, ReturnType!(foo)); // uint, not ref uint. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 21, 2012 [Issue 3756] std.traits.ReturnType broken for ref returns | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3756 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |FIXED --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-21 07:30:46 PST --- Type modifiers can't be passed around in the language, but I think there's a separate issue already opened for this. Anyway you can do: import std.traits; ref uint foo(ref uint num) { return num; } void main() { alias FunctionAttribute FA; static assert(functionAttributes!foo & FA.ref_); } -- 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