xsimd
xsimd copied to clipboard
problem compiling in Xcode ('C' does not refer to a value)
I tried to integrate xsimd with xcode project but I get the following 2 errors in xsimd_scalar.hpp
namespace detail
{
template <class C>
inline C sign_complex_scalar_impl(const C& v)
{
using value_type = typename C::value_type;
if (v.real())
{
return C(sign(v.real()), value_type(0)); //<---- 'C' does not refer to a value; Too many arguments provided to function-like macro invocation
}
else
{
return C(sign(v.imag()), value_type(0)); //<---- 'C' does not refer to a value; Too many arguments provided to function-like macro invocation
}
}
}
In project settings I used C++14
as C++ Language Dialect ([-std=c++14]
). I tried c++17 as well with the same result. I'm using MacOS 10.14.4 (Mojave) with clang:
clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
pzomacbook:build patryk$
I did manage to compile using cmake and install without error just cannot compile with Xcode. Are there any other macros or settings that have to be added?
@pzoltowski does your project or one of its dependencies define a macro called C
?
It looks like it would be the case, in which case it would not be related to xsimd.
No update from OP since 2019 and we significantly updated the code base and we validate on OSX through github CI without noticing this problem => closing.