Skip to content

Static_assert failed "incompatible pointer type" with Xcode #751

Description

@KingOfDuck

I just simply include json.hpp, using Xcode. And this error occurs while building.
Here is the place where the issue appears(3368).
The compiler also says no matching function for call to 'get_impl_ptr' at line 3379.

    3367   // make sure the type matches the allowed types
    3368  static_assert(
    3369      std::is_same<object_t, pointee_t>::value
    3370      or std::is_same<array_t, pointee_t>::value
        or std::is_same<string_t, pointee_t>::value
        or std::is_same<boolean_t, pointee_t>::value
        or std::is_same<number_integer_t, pointee_t>::value
        or std::is_same<number_unsigned_t, pointee_t>::value
        or std::is_same<number_float_t, pointee_t>::value
        , "incompatible pointer type");

    3378        // delegate the call to get_impl_ptr<>()
    3379        return get_impl_ptr(static_cast<PointerType>(nullptr));

Already added -std=c++11.
The compiler is Apple LLVM 8.1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: please discussplease discuss the issue or vote for your favorite option

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions