[libcxx-commits] [libcxx] [libc++] <experimental/simd> Add unary operators for class simd (PR #104764)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 19 08:07:00 PDT 2024


================
@@ -26,15 +27,29 @@
 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
 inline namespace parallelism_v2 {
 
+template <class _Simd, class _Impl, bool>
+class __simd_int_operators {};
+
+template <class _Simd, class _Impl>
+class __simd_int_operators<_Simd, _Impl, true> {
+public:
+  // unary operators for integral _Tp
+  _LIBCPP_HIDE_FROM_ABI _Simd operator~() const noexcept {
----------------
philnik777 wrote:

Couldn't we also just `enable_if` this individually?

https://github.com/llvm/llvm-project/pull/104764


More information about the libcxx-commits mailing list