May 01, 2016 [Issue 15978] New: Can't pass vector.init as template parameter | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15978 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@puremagic.com Reporter: lasssafin@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); -- |
Copyright © 1999-2021 by the D Language Foundation