www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10181] New: "deprecated" is ignored if used inside template

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: diggsey googlemail.com



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: -------
May 27 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10181


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



02:50:46 PDT ---
Related or dupe of Issue 9876.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 27 2013