[Issue 11924] New: inout Variadic Template Parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 14 09:03:53 PST 2014
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 at puremagic.com
ReportedBy: blah38621 at gmail.com
--- Comment #0 from Orvid King <blah38621 at gmail.com> 2014-01-14 09:03:49 PST ---
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: -------
More information about the Digitalmars-d-bugs
mailing list