Fix and add test's for SFINAE problem
This commit is contained in:
parent
06ccd43a2a
commit
e26a2904fc
3 changed files with 13 additions and 2 deletions
test/src
|
@ -1809,6 +1809,17 @@ TEST_CASE("regression tests")
|
|||
json j = smallest;
|
||||
CHECK(j.dump() == std::to_string(smallest));
|
||||
}
|
||||
|
||||
SECTION("issue #1727 - Contains with non-const lvalue json_pointer picks the wrong overload")
|
||||
{
|
||||
json j = {{"root", {{"settings", {{"logging", true}}}}}};
|
||||
|
||||
auto jptr1 = "/root/settings/logging"_json_pointer;
|
||||
auto jptr2 = json::json_pointer{"/root/settings/logging"};
|
||||
|
||||
CHECK(j.contains(jptr1));
|
||||
CHECK(j.contains(jptr2));
|
||||
}
|
||||
}
|
||||
|
||||
#if not defined(JSON_NOEXCEPTION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue