mirror of
https://github.com/nlohmann/json.git
synced 2026-07-02 16:54:19 +00:00
🐛 fix ambiguous static_cast
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -1634,7 +1634,9 @@ class binary_writer
|
||||
};
|
||||
|
||||
string_t key = "_ArrayType_";
|
||||
auto it = bjdtype.find(static_cast<string_t>(value.at(key)));
|
||||
// use get<string_t>() instead of static_cast<string_t> to avoid an
|
||||
// ambiguous conversion under explicit instantiation on C++17 (see #4825)
|
||||
auto it = bjdtype.find(value.at(key).template get<string_t>());
|
||||
if (it == bjdtype.end())
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -17820,7 +17820,9 @@ class binary_writer
|
||||
};
|
||||
|
||||
string_t key = "_ArrayType_";
|
||||
auto it = bjdtype.find(static_cast<string_t>(value.at(key)));
|
||||
// use get<string_t>() instead of static_cast<string_t> to avoid an
|
||||
// ambiguous conversion under explicit instantiation on C++17 (see #4825)
|
||||
auto it = bjdtype.find(value.at(key).template get<string_t>());
|
||||
if (it == bjdtype.end())
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user