[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
Mon Oct 21 02:10:47 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:

If we need this for a bunch of operators I think it makes sense to keep the base class.

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


More information about the libcxx-commits mailing list