Make json_pointer::back const (resolves #1764)

This commit is contained in:
christian committed 2019-10-01 00:57:27 +02:00
1 parent 99d7518d21
commit 7476f5ee0c
3 files changed
+6 -2

No files matched your search

+4
View File
@@ -559,6 +559,10 @@ TEST_CASE("JSON pointers")
CHECK(!ptr.empty());
CHECK(j[ptr] == j["answer"]["everything"]);
// check access via const pointer
const auto cptr = ptr;
CHECK(cptr.back() == "everything");
ptr.pop_back();
ptr.pop_back();
CHECK(ptr.empty());