rapidjson
rapidjson copied to clipboard
include document.h error on compiling on M2 ARM64 Mac - Clang 14.0.3
The project works fine in my intel Mac but fails to compile on my M2 Mac - this is the error message I get on including the document.h header file. Is rapidjson tested for arm64 machines and this compiler version? It works fine on g++ 13.x but I need it to work with Clang 14.x :/
In file included from examplerapidjson.cpp:2:
./dependencies/rapidjson/document.h:667:51: error: found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?
template <typename Encoding, typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR >
^
./dependencies/rapidjson/document.h:78:79: note: expanded from macro 'RAPIDJSON_DEFAULT_ALLOCATOR'
#define RAPIDJSON_DEFAULT_ALLOCATOR ::RAPIDJSON_NAMESPACE::MemoryPoolAllocator<::RAPIDJSON_NAMESPACE::CrtAllocator>
^
./dependencies/rapidjson/document.h:2498:51: error: found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?
template <typename Encoding, typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR >
^
./dependencies/rapidjson/document.h:78:79: note: expanded from macro 'RAPIDJSON_DEFAULT_ALLOCATOR'
#define RAPIDJSON_DEFAULT_ALLOCATOR ::RAPIDJSON_NAMESPACE::MemoryPoolAllocator<::RAPIDJSON_NAMESPACE::CrtAllocator>
^
./dependencies/rapidjson/document.h:1247:42: error: type of thread-local variable has non-trivial destruction
__thread static GenericValue buffer;
^
./dependencies/rapidjson/document.h:1211:16: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<> >::operator[]<rapidjson::MemoryPoolAllocator<> >' requested here
return (*this)[n];
^
examplerapidjson.cpp:16:17: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<> >::operator[]<const char>' requested here
Value& s = d["stars"];
+1