rapidjson
rapidjson copied to clipboard
vs 2019 编译rtti时候,rapidjson 的库报错
D:\Qt\rttr-0.9.6-src\3rd_party\rapidjson-1.1.0\rapidjson/document.h(102): error C2220: 以下警告被视为错误
D:\Qt\rttr-0.9.6-src\3rd_party\rapidjson-1.1.0\rapidjson/document.h(102): warning C4996: 'std::iterator<std::random_access_iterator_tag,rapidjson::GenericMember<Encoding,Allocator>,ptrdiff_t,rapidjson::GenericMember<Encoding,Allocator> *,rapidjson::GenericMember<Encoding,Allocator> &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning.
with
[
Encoding=rapidjson::UTF8,
Allocator=rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\xutility(7028): note: 参见“std::iterator”的声明
D:\Qt\rttr-0.9.6-src\3rd_party\rapidjson-1.1.0\rapidjson/document.h(562): note: 查看对正在编译的 类 模板 实例化“rapidjson::GenericMemberIterator<false,Encoding,Allocator>”的引用
with
[
Encoding=rapidjson::UTF8,
Allocator=rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator
]
D:\Qt\rttr-0.9.6-src\src\examples\json_serialization\from_json.cpp(55): note: 查看对正在编译的 类 模板 实例化“rapidjson::GenericValue<rapidjson::UTF8,rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator>”的引用
D:\Qt\rttr-0.9.6-src\3rd_party\rapidjson-1.1.0\rapidjson/document.h(102): warning C4996: 'std::iterator<std::random_access_iterator_tag,const rapidjson::GenericMember<Encoding,Allocator>,ptrdiff_t,const rapidjson::GenericMember<Encoding,Allocator> *,const rapidjson::GenericMember<Encoding,Allocator> &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning.
with
[
Encoding=rapidjson::UTF8,
Allocator=rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\xutility(7028): note: 参见“std::iterator”的声明
D:\Qt\rttr-0.9.6-src\3rd_party\rapidjson-1.1.0\rapidjson/document.h(563): note: 查看对正在编译的 类 模板 实例化“rapidjson::GenericMemberIterator<true,Encoding,Allocator>”的引用
with
[
Encoding=rapidjson::UTF8,
Allocator=rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator
]
[4/5 2.1/sec] Running unit_tests
All tests passed (4921 assertions in 531 test cases)
ninja: build stopped: subcommand failed. 13:44:09: 进程"C:\Qt\Tools\CMake_64\bin\cmake.exe"退出,退出代码 1 。 Error while building/deploying project rttr (kit: Desktop Qt 5.15.2 MSVC2019 64bit) When executing step "构建" 13:44:09: Elapsed time: 00:02.
duplicated with #1131