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

Compiler error with -std=c++17 on clang #137

Open
jarnoharno opened this issue Aug 23, 2019 · 1 comment
Open

Compiler error with -std=c++17 on clang #137

jarnoharno opened this issue Aug 23, 2019 · 1 comment

Comments

@jarnoharno
Copy link

error.cpp:

#define SIMDPP_ARCH_X86_SSE2
#include "simdpp/simd.h"

Compiling with

$ clang++ -std=c++17 -c -I libsimdpp error.cpp

produces the following error:

In file included from error.cpp:3:
In file included from libsimdpp/simdpp/simd.h:19:
In file included from libsimdpp/simdpp/core/align.h:15:
In file included from libsimdpp/simdpp/types.h:44:
libsimdpp/simdpp/types/empty_expr.h:220:52: error: no viable conversion from returned value
      of type 'const mask_int32<4U>' to function return type 'uint32<4U>'
    SIMDPP_INL operator uint32<N>() const { return e; }
                                                   ^
libsimdpp/simdpp/detail/insn/cmp_neq.h:195:21: note: in instantiation of member function
      'simdpp::arch_sse2::mask_int32<4, simdpp::arch_sse2::expr_empty>::operator uint32'
      requested here
    r32 = (uint32x4)cmp_eq(uint32x4(a), uint32x4(b));
                    ^
libsimdpp/simdpp/types/int32x4.h:123:16: note: candidate constructor not viable: no known
      conversion from 'const mask_int32<4U>' to 'const uint32<4> &' for 1st argument
    SIMDPP_INL uint32<4>(const uint32<4> &) = default;
               ^
libsimdpp/simdpp/types/int32x4.h:138:16: note: candidate constructor not viable: no known
      conversion from 'const mask_int32<4U>' to 'const simdpp::arch_sse2::uint32<4,
      void>::native_type &' (aka 'const __m128i &') for 1st argument
    SIMDPP_INL uint32<4>(const native_type& d) : d_(d) {}
               ^
libsimdpp/simdpp/types/int32x4.h:126:34: note: candidate template ignored: could not match
      'uint32' against 'mask_int32'
    template<class E> SIMDPP_INL uint32<4>(const uint32<4,E>& d) { *this = d.eval(); }
                                 ^
libsimdpp/simdpp/types/int32x4.h:127:34: note: candidate template ignored: could not match
      'int32' against 'mask_int32'
    template<class E> SIMDPP_INL uint32<4>(const int32<4,E>& d) { *this = d.eval(); }
                                 ^
libsimdpp/simdpp/types/int32x4.h:148:34: note: candidate template ignored: could not match
      'expr_vec_construct' against 'mask_int32'
    template<class E> SIMDPP_INL uint32<4>(const expr_vec_construct<E>& e)
                                 ^
libsimdpp/simdpp/types/int32x4.h:221:16: note: candidate function
    SIMDPP_INL operator native_type() const SIMDPP_IMPLICIT_CONVERSION_DEPRECATION_MSG
               ^
1 error generated.

The compiler version is Apple LLVM version 10.0.1 (clang-1001.0.46.4)

Compiling with c++11 or c++14 work ok.

@peabody-korg
Copy link
Contributor

same issue here (same version of clang). this will block us from moving to C++17 until this is resolved.

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

2 participants