Skip to content

problem compiling in Xcode ('C' does not refer to a value) #283

@pzoltowski

Description

@pzoltowski

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions