| 74 | // tag::doc_storage_ptr_5[] |
| 75 | template< class Handler > |
| 76 | void do_rpc( string_view s, Handler&& h ) |
| 77 | { |
| 78 | unsigned char buffer[ 8192 ]; // Small stack buffer to avoid most allocations during parse |
| 79 | monotonic_resource mr( buffer ); // This resource will use our local buffer first |
| 80 | value const jv = parse( s, &mr ); // Parse the input string into a value that uses our resource |
| 81 | h( jv ); // Call the handler to perform the RPC command |
| 82 | } |
| 83 | // end::doc_storage_ptr_5[] |
| 84 | |
| 85 | //---------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected