[Issue 15978] New: Can't pass vector.init as template parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 1 05:16:40 PDT 2016


          Issue ID: 15978
           Summary: Can't pass vector.init as template parameter
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: lasssafin at gmail.com

template MyTemplate(alias parameter) {}

alias MyVec = __vector(float[4]);

//x.d(6): Error: expression cast(__vector(float[4]))[nanF, nanF, nanF, nanF] is
not a valid template value argument
//alias _ = MyTemplate!(MyVec.init);

//x.d(8): Error: found '.' when expecting ')' following template argument list
//x.d(8): Error: unexpected identifer 'init' in declarator
//x.d(8): Error: semicolon expected to close alias declaration
//x.d(8): Error: declaration expected, not ')'
//alias __ = MyTemplate!(__vector(float[4]).init);


More information about the Digitalmars-d-bugs mailing list