🔀 Merge branch 'develop' into feature/messagepack

This commit is contained in:
Niels Lohmann 2016-12-11 16:11:43 +01:00
parent dc6fc3e079
commit a59eb4868a
3 changed files with 23 additions and 36 deletions

View file

@ -537,6 +537,7 @@ I deeply appreciate the help of the following people.
- [Pierre-Antoine Lacaze](https://github.com/palacaze) found a subtle bug in the `dump()` function.
- [TurpentineDistillery](https://github.com/TurpentineDistillery) pointed to [`std::locale::classic()`](http://en.cppreference.com/w/cpp/locale/locale/classic) to avoid too much locale joggling, found some nice performance improvements in the parser and improved the benchmarking code.
- [cgzones](https://github.com/cgzones) had an idea how to fix the Coverity scan.
- [Jared Grubb](https://github.com/jaredgrubb) silenced a nasty documentation warning.
Thanks a lot for helping out!

View file

@ -73,6 +73,7 @@ SOFTWARE.
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wdocumentation"
#endif
// allow for portable deprecation warnings
@ -944,7 +945,7 @@ class basic_json
With a parser callback function, the result of parsing a JSON text can be
influenced. When passed to @ref parse(std::istream&, const
parser_callback_t) or @ref parse(const char*, const parser_callback_t),
parser_callback_t) or @ref parse(const CharT, const parser_callback_t),
it is called on certain events (passed as @ref parse_event_t via parameter
@a event) with a set recursion depth @a depth and context JSON value
@a parsed. The return value of the callback function is a boolean
@ -987,7 +988,7 @@ class basic_json
skipped completely or replaced by an empty discarded object.
@sa @ref parse(std::istream&, parser_callback_t) or
@ref parse(const char*, parser_callback_t) for examples
@ref parse(const CharT, const parser_callback_t) for examples
@since version 1.0.0
*/
@ -6003,11 +6004,11 @@ class basic_json
@since version 1.0.0 (originally for @ref string_t)
*/
template<typename CharPT, typename std::enable_if<
std::is_pointer<CharPT>::value and
std::is_integral<typename std::remove_pointer<CharPT>::type>::value and
sizeof(typename std::remove_pointer<CharPT>::type) == 1, int>::type = 0>
static basic_json parse(const CharPT s,
template<typename CharT, typename std::enable_if<
std::is_pointer<CharT>::value and
std::is_integral<typename std::remove_pointer<CharT>::type>::value and
sizeof(typename std::remove_pointer<CharT>::type) == 1, int>::type = 0>
static basic_json parse(const CharT s,
const parser_callback_t cb = nullptr)
{
return parser(reinterpret_cast<const char*>(s), cb).parse();
@ -6032,7 +6033,7 @@ class basic_json
@liveexample{The example below demonstrates the `parse()` function with
and without callback function.,parse__istream__parser_callback_t}
@sa @ref parse(const char*, const parser_callback_t) for a version
@sa @ref parse(const CharT, const parser_callback_t) for a version
that reads from a string
@since version 1.0.0
@ -10494,8 +10495,6 @@ basic_json_parser_66:
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -10514,8 +10513,6 @@ basic_json_parser_66:
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -10534,8 +10531,6 @@ basic_json_parser_66:
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -11423,13 +11418,11 @@ basic_json_parser_66:
/*!
@brief replace all occurrences of a substring by another string
@param[in,out] s the string to manipulate
@param[in,out] s the string to manipulate; changed so that all
occurrences of @a f are replaced with @a t
@param[in] f the substring to replace with @a t
@param[in] t the string to replace @a f
@return The string @a s where all occurrences of @a f are replaced
with @a t.
@pre The search string @a f must not be empty.
@since version 2.0.0

View file

@ -73,6 +73,7 @@ SOFTWARE.
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wdocumentation"
#endif
// allow for portable deprecation warnings
@ -944,7 +945,7 @@ class basic_json
With a parser callback function, the result of parsing a JSON text can be
influenced. When passed to @ref parse(std::istream&, const
parser_callback_t) or @ref parse(const char*, const parser_callback_t),
parser_callback_t) or @ref parse(const CharT, const parser_callback_t),
it is called on certain events (passed as @ref parse_event_t via parameter
@a event) with a set recursion depth @a depth and context JSON value
@a parsed. The return value of the callback function is a boolean
@ -987,7 +988,7 @@ class basic_json
skipped completely or replaced by an empty discarded object.
@sa @ref parse(std::istream&, parser_callback_t) or
@ref parse(const char*, parser_callback_t) for examples
@ref parse(const CharT, const parser_callback_t) for examples
@since version 1.0.0
*/
@ -6003,11 +6004,11 @@ class basic_json
@since version 1.0.0 (originally for @ref string_t)
*/
template<typename CharPT, typename std::enable_if<
std::is_pointer<CharPT>::value and
std::is_integral<typename std::remove_pointer<CharPT>::type>::value and
sizeof(typename std::remove_pointer<CharPT>::type) == 1, int>::type = 0>
static basic_json parse(const CharPT s,
template<typename CharT, typename std::enable_if<
std::is_pointer<CharT>::value and
std::is_integral<typename std::remove_pointer<CharT>::type>::value and
sizeof(typename std::remove_pointer<CharT>::type) == 1, int>::type = 0>
static basic_json parse(const CharT s,
const parser_callback_t cb = nullptr)
{
return parser(reinterpret_cast<const char*>(s), cb).parse();
@ -6032,7 +6033,7 @@ class basic_json
@liveexample{The example below demonstrates the `parse()` function with
and without callback function.,parse__istream__parser_callback_t}
@sa @ref parse(const char*, const parser_callback_t) for a version
@sa @ref parse(const CharT, const parser_callback_t) for a version
that reads from a string
@since version 1.0.0
@ -9644,8 +9645,6 @@ class basic_json
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -9664,8 +9663,6 @@ class basic_json
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -9684,8 +9681,6 @@ class basic_json
supplied via the first parameter. Set this to @a
static_cast<number_float_t*>(nullptr).
@param[in] type the @ref number_float_t in use
@param[in,out] endptr recieves a pointer to the first character after
the number
@ -10573,13 +10568,11 @@ class basic_json
/*!
@brief replace all occurrences of a substring by another string
@param[in,out] s the string to manipulate
@param[in,out] s the string to manipulate; changed so that all
occurrences of @a f are replaced with @a t
@param[in] f the substring to replace with @a t
@param[in] t the string to replace @a f
@return The string @a s where all occurrences of @a f are replaced
with @a t.
@pre The search string @a f must not be empty.
@since version 2.0.0