[Issue 16697] New: Extend IsExpression to accept __vector as a TypeSpecialization
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 16 16:50:35 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16697
Issue ID: 16697
Summary: Extend IsExpression to accept __vector as a
TypeSpecialization
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
https://dlang.org/spec/expression.html#TypeSpecialization
Add __vector to the list of TypeSpecialization's. When used:
is (__vector(float[4]) == __vector)
will return true,
is (__vector(float[4]) A == __vector)
will set A to float[4].
This can be done with:
is (__vector(float[4]) == __vector(T[N]), T, size_t N)
alias A = T[N];
but is a bit noisy. The need for this comes up with templates specialized to
work with vectors.
--
More information about the Digitalmars-d-bugs
mailing list