MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / reverse_object_iterator

Function reverse_object_iterator

examples/src/json_accessor_examples.cpp:149–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void reverse_object_iterator()
150{
151 ojson j;
152 j["city"] = "Toronto";
153 j["province"] = "Ontario";
154 j["country"] = "Canada";
155
156 for (auto it = j.object_range().crbegin(); it != j.object_range().crend(); ++it)
157 {
158 std::cout << it->key() << " => " << it->value().as<std::string>() << '\n';
159 }
160 std::cout << "\n";
161}
162
163int main()
164{

Callers 1

mainFunction · 0.85

Calls 4

crbeginMethod · 0.45
crendMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected