-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add reserve
function for array to reserve memory before adding json values into it
#436
Labels
Comments
You can currently do this manually using this function:
Once the array exists in the json object, this function will give you a pointer to it, which you can use to call reserve yourself. (That's not to say that this shouldn't be added.) |
no, |
Oh, sorry, I thought these had been added as public. Maybe I was thinking of a request that never went through. |
There is |
Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
std::vector
has a very usefulreserve
function that is used to preallocate memory for futurepush_back
s. It reducespush_back
time in case if a number of items is high. So it would be useful to add this function tobasic_json
for arrayreserve
The text was updated successfully, but these errors were encountered: