Fix compilation error that can occur with custom string not implicitely convertible to std::string
This commit is contained in:
parent
176d8e261a
commit
dc7f80581c
@ -3499,7 +3499,7 @@ class basic_json
|
|||||||
JSON_CATCH (std::out_of_range&)
|
JSON_CATCH (std::out_of_range&)
|
||||||
{
|
{
|
||||||
// create better exception explanation
|
// create better exception explanation
|
||||||
JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this));
|
JSON_THROW(out_of_range::create(403, "key '" + std::string(key.begin(), key.end()) + "' not found", *this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3550,7 +3550,7 @@ class basic_json
|
|||||||
JSON_CATCH (std::out_of_range&)
|
JSON_CATCH (std::out_of_range&)
|
||||||
{
|
{
|
||||||
// create better exception explanation
|
// create better exception explanation
|
||||||
JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this));
|
JSON_THROW(out_of_range::create(403, "key '" + std::string(key.begin(), key.end()) + "' not found", *this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -20282,7 +20282,7 @@ class basic_json
|
|||||||
JSON_CATCH (std::out_of_range&)
|
JSON_CATCH (std::out_of_range&)
|
||||||
{
|
{
|
||||||
// create better exception explanation
|
// create better exception explanation
|
||||||
JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this));
|
JSON_THROW(out_of_range::create(403, "key '" + std::string(key.begin(), key.end()) + "' not found", *this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -20333,7 +20333,7 @@ class basic_json
|
|||||||
JSON_CATCH (std::out_of_range&)
|
JSON_CATCH (std::out_of_range&)
|
||||||
{
|
{
|
||||||
// create better exception explanation
|
// create better exception explanation
|
||||||
JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this));
|
JSON_THROW(out_of_range::create(403, "key '" + std::string(key.begin(), key.end()) + "' not found", *this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user