mirror of
https://github.com/nlohmann/json.git
synced 2024-11-27 16:49:02 +08:00
Fixed json_pointer::to_string() failing to compile with custom string type
This commit is contained in:
parent
356489659c
commit
96129bd96d
@ -71,7 +71,7 @@ class json_pointer
|
||||
string_t{},
|
||||
[](const string_t& a, const string_t& b)
|
||||
{
|
||||
return detail::concat(a, '/', detail::escape(b));
|
||||
return detail::concat<string_t>(a, '/', detail::escape(b));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -13755,7 +13755,7 @@ class json_pointer
|
||||
string_t{},
|
||||
[](const string_t& a, const string_t& b)
|
||||
{
|
||||
return detail::concat(a, '/', detail::escape(b));
|
||||
return detail::concat<string_t>(a, '/', detail::escape(b));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -346,6 +346,9 @@ TEST_CASE("alternative string type")
|
||||
|
||||
CHECK(j.at(alt_json::json_pointer("/foo/0")) == j["foo"][0]);
|
||||
CHECK(j.at(alt_json::json_pointer("/foo/1")) == j["foo"][1]);
|
||||
|
||||
// ensures successful compilation
|
||||
CHECK(alt_json::json_pointer("/foo/0").to_string() == "/foo/0");
|
||||
}
|
||||
|
||||
SECTION("JSON patch")
|
||||
|
Loading…
Reference in New Issue
Block a user