Merge branch 'feature/hedley' into develop

This commit is contained in:
Niels Lohmann 2019-07-14 20:58:08 +02:00
commit a501365ea2
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
35 changed files with 5861 additions and 959 deletions

View file

@ -8,6 +8,7 @@
#include <string> // string
#include <nlohmann/detail/input/binary_reader.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/output/output_adapters.hpp>
namespace nlohmann
@ -714,7 +715,7 @@ class binary_writer
static std::size_t calc_bson_entry_header_size(const string_t& name)
{
const auto it = name.find(static_cast<typename string_t::value_type>(0));
if (JSON_UNLIKELY(it != BasicJsonType::string_t::npos))
if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))
{
JSON_THROW(out_of_range::create(409,
"BSON key cannot contain code point U+0000 (at byte " + std::to_string(it) + ")"));