@@ -1116,8 +1116,9 @@ template <typename T, typename Mask = simd8<bool>> struct base_u8 {
11161116 return *this_cast;
11171117 }
11181118
1119- is_utf8_really_inline Mask operator==(const simd8<T> other) const {
1120- return vceqq_u8(*this, other);
1119+ friend is_utf8_really_inline Mask operator==(const simd8<T> lhs,
1120+ const simd8<T> rhs) {
1121+ return vceqq_u8(lhs, rhs);
11211122 }
11221123
11231124 template <int N = 1>
@@ -2539,8 +2540,9 @@ struct base8 : base<simd8<T>> {
25392540 is_utf8_really_inline T last () const {
25402541 return _mm256_extract_epi8 (*this , 31 );
25412542 }
2542- is_utf8_really_inline Mask operator ==(const simd8<T> other) const {
2543- return _mm256_cmpeq_epi8 (*this , other);
2543+ friend is_utf8_really_inline Mask operator ==(const simd8<T> lhs,
2544+ const simd8<T> rhs) {
2545+ return _mm256_cmpeq_epi8 (lhs, rhs);
25442546 }
25452547
25462548 static const int SIZE = sizeof (base<T>::value);
@@ -2965,8 +2967,9 @@ struct base16 : base<simd16<T>> {
29652967 is_utf8_really_inline base16 (const Pointer *ptr)
29662968 : base16(_mm256_loadu_si256(reinterpret_cast <const __m256i *>(ptr))) {}
29672969
2968- is_utf8_really_inline Mask operator ==(const simd16<T> other) const {
2969- return _mm256_cmpeq_epi16 (*this , other);
2970+ friend is_utf8_really_inline Mask operator ==(const simd16<T> lhs,
2971+ const simd16<T> rhs) {
2972+ return _mm256_cmpeq_epi16 (lhs, rhs);
29702973 }
29712974
29722975 // / the size of vector in bytes
@@ -3517,8 +3520,9 @@ struct base8 : base<simd8<T>> {
35173520 is_utf8_really_inline base8 () : base<simd8<T>>() {}
35183521 is_utf8_really_inline base8 (const __m128i _value) : base<simd8<T>>(_value) {}
35193522
3520- is_utf8_really_inline Mask operator ==(const simd8<T> other) const {
3521- return _mm_cmpeq_epi8 (*this , other);
3523+ friend is_utf8_really_inline Mask operator ==(const simd8<T> lhs,
3524+ const simd8<T> rhs) {
3525+ return _mm_cmpeq_epi8 (lhs, rhs);
35223526 }
35233527
35243528 static const int SIZE = sizeof (base<simd8<T>>::value);
@@ -4032,8 +4036,9 @@ struct base16 : base<simd16<T>> {
40324036 is_utf8_really_inline base16 (const Pointer *ptr)
40334037 : base16(_mm_loadu_si128(reinterpret_cast <const __m128i *>(ptr))) {}
40344038
4035- is_utf8_really_inline Mask operator ==(const simd16<T> other) const {
4036- return _mm_cmpeq_epi16 (*this , other);
4039+ friend is_utf8_really_inline Mask operator ==(const simd16<T> lhs,
4040+ const simd16<T> rhs) {
4041+ return _mm_cmpeq_epi16 (lhs, rhs);
40374042 }
40384043
40394044 static const int SIZE = sizeof (base<simd16<T>>::value);
0 commit comments