[Issue 2876] Enhancement to 'auto' return

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 26 18:52:07 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2876


Witold Baryluk <baryluk at smp.if.uj.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |baryluk at smp.if.uj.edu.pl
         Resolution|                            |WORKSFORME


--- Comment #4 from Witold Baryluk <baryluk at smp.if.uj.edu.pl> 2009-12-26 18:52:06 PST ---
I don't see any problem with this example. It is quite simple to compile, and
in fact it works in DMD 2.037 as desired. This example uses three things which
are fully supported:
 - static if over template parameters, no problem for long time
 - coping/allocating variable on heap if they are used in delegate (or nested
functions) and returned from function (escaping scope), no problem in most
cases
 - infering return type, no problem as we have exactly one return (after static
if selection), and its type is quite "simple"  (it is delegate int(int), or
delegate float(float)), and compiler knows this.


Please close this bug with WORKSFORME.

-- 
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