Ported from upstream.
extlib\rapidjson\include\rapidjson\internal\biginteger.h(22,9): error C2220: the following warning is treated as an error (compiling source file src\librpbase\TextOut_json.cpp)
extlib\rapidjson\include\rapidjson\internal\biginteger.h(22,9): warning C4163: 'UnsignedMultiply128': not available as an intrinsic function (compiling source file src\librpbase\TextOut_json.cpp)
extlib\rapidjson\include\rapidjson\internal\diyfp.h(27,9): warning C4163: 'UnsignedMultiply128': not available as an intrinsic function (compiling source file src\librpbase\TextOut_json.cpp)
rapidjson hasn't had a proper release since August 2016, even though it's
had patches as recently as this past September. This patch is from
December 2017 and reworks GenericMemberIterator to not inherit from
std::iterator.
This fixes several warnings in MSVC when compiling in C++17 mode:
extlib\rapidjson\include\rapidjson/document.h(111,5): warning C4996:
'std::iterator<std::random_access_iterator_tag,internal::MaybeAddConst
<Const,rapidjson::GenericMember<Encoding,Allocator>>::Type,ptrdiff_t,
internal::MaybeAddConst<Const,rapidjson::GenericMember<Encoding,Allocator>>
::Type*,internal::MaybeAddConst<Const,rapidjson::GenericMember<Encoding,Allocator>>::Type&>':
warning STL4015: The std::iterator class template (used as a base class
to provide typedefs) is deprecated in C++17. (The <iterator> 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.
minizip-ng:
extlib/minizip-ng/mz_os_posix.c: In function ‘mz_os_utf8_string_create’:
extlib/minizip-ng/mz_os_posix.c:94:63: warning: unused parameter ‘encoding’ [-Wunused-parameter]
94 | uint8_t *mz_os_utf8_string_create(const char *string, int32_t encoding) {
| ~~~~~~~~^~~~~~~~
rapidjson:
src/librpbase/TextOut_json.cpp:31:
extlib/rapidjson/include/rapidjson/document.h:102:19: warning:
‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
struct std::iterator’ is deprecated [-Wdeprecated-declarations]
102 | : public std::iterator<std::random_access_iterator_tag
| ^~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_algobase.h:65,
from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/algorithm:60,
from src/librpbase/stdafx.h:28,
from src/librpbase/TextOut_json.cpp:10:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
- TextOut: Added CRLF linebreak options, which are needed for
copying to clipboard on Windows.
[rapidjson] prettywriter.h: Added a CRLF linebreak option.
The JSON output code will be rewritten to use rapidjson, which will allow
us to add more stuff without having to worry if the resulting text has
the correct formatting.
This adds around 20 KB to the compiled binary.