www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16697] New: Extend IsExpression to accept __vector as a


          Issue ID: 16697
           Summary: Extend IsExpression to accept __vector as a
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com


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.

Nov 16 2016