From 8de10c518b28b2c2d9b79e84f49d8c5e53229407 Mon Sep 17 00:00:00 2001 From: Julian Becker Date: Wed, 17 Oct 2018 21:47:01 +0200 Subject: [PATCH] BSON: Hopefully fixing ambiguity (on some compilers) to call to string::find() --- include/nlohmann/detail/output/binary_writer.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 631acce2..f659476e 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -683,7 +683,7 @@ class binary_writer */ static std::size_t calc_bson_entry_header_size(const typename BasicJsonType::string_t& name) { - if (name.find(static_cast(0)) != BasicJsonType::string_t::npos) + if (name.find(static_cast(0)) != BasicJsonType::string_t::npos) { JSON_THROW(out_of_range::create(409, "BSON key cannot contain code point U+0000")); } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 94a0be69..e739eb5c 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -8840,7 +8840,7 @@ class binary_writer */ static std::size_t calc_bson_entry_header_size(const typename BasicJsonType::string_t& name) { - if (name.find(static_cast(0)) != BasicJsonType::string_t::npos) + if (name.find(static_cast(0)) != BasicJsonType::string_t::npos) { JSON_THROW(out_of_range::create(409, "BSON key cannot contain code point U+0000")); }