Open dmacks opened 3 years ago
But if I cmake with -DRAPIDJSON_BUILD_CXX11=no, build later fails differently:
[ 38%] Building CXX object example/CMakeFiles/schemavalidator.dir/schemavalidator/schemavalidator.cpp.o
cd /tmp/rapidjson-1.1.0/build/example && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -D__STDC_FORMAT_MACROS -I/tmp/rapidjson-1.1.0/include -I/tmp/rapidjson-1.1.0/example/../include -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything -O2 -g -DNDEBUG -o CMakeFiles/schemavalidator.dir/schemavalidator/schemavalidator.cpp.o -c /tmp/rapidjson-1.1.0/example/schemavalidator/schemavalidator.cpp
In file included from /tmp/rapidjson-1.1.0/example/schemavalidator/schemavalidator.cpp:7:
/tmp/rapidjson-1.1.0/include/rapidjson/schema.h:382:56: error: declaration shadows a typedef in 'Schema<SchemaDocumentType>' [-Werror,-Wshadow]
typedef typename SchemaDocumentType::ValueType ValueType;
^
/tmp/rapidjson-1.1.0/include/rapidjson/schema.h:340:52: note: previous declaration is here
typedef typename SchemaDocumentType::ValueType ValueType;
^
1 error generated.
have you solved this?
add -DCMAKE_CXX_FLAGS="-Wno-shadow" with cmake will compile success, by the way, use shadow variable in source code is not a good practice. @miloyip
Building rapidjson-1.1.0 on OS 10.13 with xcode-10.1 (Apple LLVM version 10.0.0 clang-1000.11.45.5) fails:
followed by a mile of similar such messages in other source locations. Might be a new issue triggered by -std=c++11 ?