[Issue 10181] New: "deprecated" is ignored if used inside template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 27 00:25:08 PDT 2013


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

           Summary: "deprecated" is ignored if used inside template
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: diggsey at googlemail.com


--- Comment #0 from Diggory <diggsey at googlemail.com> 2013-05-27 00:25:06 PDT ---
For example:

template CustomTuple(TList...)
{
    deprecated {
        alias TList CustomTuple;
    }
}

alias CustomTuple!(int, 1) MyTuple; // Should show deprecation warning

There does exist a fairly simple work-around luckily:
template CustomTuple(TList...)
{
    deprecated {
        alias TList Temp;
    }
    alias Temp CustomTuple;
}

alias CustomTuple!(int, 1) MyTuple; // Correctly shows deprecation warning

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