Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect SFINAE constraint on (static)_simd_cast #66

Open
mattkretz opened this issue May 28, 2018 · 0 comments
Open

incorrect SFINAE constraint on (static)_simd_cast #66

mattkretz opened this issue May 28, 2018 · 0 comments

Comments

@mattkretz
Copy link

mattkretz commented May 28, 2018

[parallel.simd.casts] p5 and p11 allow all non-simd types T. p5 has a implicit requirement of an arithmetic type, since it must be able to represent all possible values of U (note a misspelled To, that should be T in p5). But one could argue that a UDT can fulfill this requirement. Since only vectorizable types T are valid for simd<T>, the constraint should use this term instead.

Proposed resolution:

9.4.5/5
Remarks: The function shall not participate in overload resolution unless

  • every possible value of type U can be represented with type ToT, and
  • either
    • is_simd_v<T> is falseT is a vectorizable type, or
    • is_simd_v<T> and T::size() == simd<U, Abi>::size() isare true.

9.4.5/11
Remarks: The function shall not participate in overload resolution unless either

  • is_simd_v<T> is falseT is a vectorizable type, or
  • is_simd_v<T> and T::size() == simd<U, Abi>::size() isare true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant