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

Support for std::byte #39

Open
someonewithpc opened this issue Aug 13, 2023 · 0 comments
Open

Support for std::byte #39

someonewithpc opened this issue Aug 13, 2023 · 0 comments

Comments

@someonewithpc
Copy link

someonewithpc commented Aug 13, 2023

version / revision Operating System Compiler & Version Compiler Flags CPU
? Linux gcc 13.2.1 20230801 None N/A

Testcase

#include <experimental/simd>
#include <cstddef>

int main() {
  std::experimental::native_simd<std::byte> s;
}

Actual Results

$ g++ byte.cpp
In file included from /usr/include/c++/13.2.1/experimental/simd:74,
                 from byte.cpp:1:
/usr/include/c++/13.2.1/experimental/bits/simd.h: In substitution of ‘template<class _Tp> using std::experimental::parallelism_v2::native_simd = std::experimental::parallelism_v2::simd<_Tp, std::experimental::parallelism_v2::simd_abi::native<_Tp> > [with _Tp = std::byte]’:
byte.cpp:5:43:   required from here
/usr/include/c++/13.2.1/experimental/bits/simd.h:3018:9: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
 3018 |   using native_simd = simd<_Tp, simd_abi::native<_Tp>>;
      |         ^~~~~~~~~~~

Expected Results

Compiles with support for the same operators as std::byte

Let me know if you think this is a direction worth taking and I can write a PR

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