[Issue 1514] New: mixin doesn't make the template to "function template"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 17 22:56:43 PDT 2007


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

           Summary: mixin doesn't make the template to "function template"
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: davidl at 126.com


import std.stdio;
template prerequisite(T)
{
        static assert(T.max==int.max);
        alias T type;
}

template mytemp(T)
{
        mixin subtemp!(T);
        template subtemp(U:prerequisite!(T).type)
        {
                void mytemp(T v)
                {
                        writefln(v);
                }
        }
}

void main()
{
        mytemp(3);
}


-- 



More information about the Digitalmars-d-bugs mailing list