MCPcopy Create free account
hub / github.com/boostorg/json / f

Function f

test/doc_quick_look.cpp:109–122  ·  view source on GitHub ↗

tag::doc_quick_look_7[]

Source from the content-addressed store, hash-verified

107
108// tag::doc_quick_look_7[]
109value f()
110{
111 // create a reference-counted memory resource
112 storage_ptr sp = make_shared_resource< monotonic_resource >();
113
114 // construct with shared ownership of the resource
115 value jv( sp );
116
117 // assign an array with 3 elements, the monotonic resource will be used
118 jv = { 1, 2, 3 };
119
120 // The caller receives the value, which still owns the resource
121 return jv;
122}
123// end::doc_quick_look_7[]
124//----------------------------------------------------------
125

Callers 11

fail_loopFunction · 0.70
grind_oneMethod · 0.70
grindMethod · 0.70
fcMethod · 0.70
grind_oneMethod · 0.70
grindMethod · 0.70
fcMethod · 0.70
run_forFunction · 0.50
benchFunction · 0.50
run_forFunction · 0.50
do_testFunction · 0.50

Calls

no outgoing calls

Tested by 1

fail_loopFunction · 0.56