https://issues.dlang.org/show_bug.cgi?id=16703

          Issue ID: 16703
           Summary: Support indexing of SIMD vector types
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Indexing should work, at least on lvalues:

  import core.simd;

  float foo(float4 f4) {
    // This should work
    return f4[2];

    // This currently does work
    return (*cast(float[4]*)&f4)[2];
  }

Slicing should also work:

  float[4] foo(float4 f4) {
    return f4[];
  }

--

Reply via email to