www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11924] New: inout Variadic Template Parameters

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11924

           Summary: inout Variadic Template Parameters
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: blah38621 gmail.com



In the previous version of DMD I was using, a snapshot from right around the
release of 2.064, this compiles fine, however, in the git head, this fails to
compile with `menuItem_1.itemTitle only parameters or stack based variables can
be inout` (This is the reduced version produced by dustmite)

inout(StringType) localize(StringType)(inout StringType str, string locale)
{
    return str;
}

struct __slim_Root
{
    static menuItem_1(ARGS...)()
    {
        enum itemTitle = ARGS;
    }

    static content_left_1()
    {
        menuItem!(localize("Home", ""));
    }
    alias menuItem = menuItem_1;
}

Also, while I did just realize I have a small bug in my code (I'm forcing
localize to be evaluated at compile time, while I meant for it to be done at
runtime), this code should still compile.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 14 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11924


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



https://github.com/D-Programming-Language/dmd/pull/3097

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 14 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11924




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/94d516e444d3c36030ea9aa63635528ac51475ee
fix Issue 11924 - inout Variadic Template Parameters

https://github.com/D-Programming-Language/dmd/commit/3b37a573bf46a3463e8de41008ee4c9d81e75974


[REG2.065a] Issue 11924 - inout Variadic Template Parameters

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11924


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11924




Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e62b283058aa99187b910e103976e3d0a02117b6


[REG2.065a] Issue 11924 - inout Variadic Template Parameters

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014