Skip to content
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

""-operators ignore the length parameter #340

Closed
bisqwit opened this issue Oct 21, 2016 · 1 comment
Closed

""-operators ignore the length parameter #340

bisqwit opened this issue Oct 21, 2016 · 1 comment

Comments

@bisqwit
Copy link

bisqwit commented Oct 21, 2016

The operator""_json() and operator""_json_pointer() seem to be ignoring the length parameter generated by the compiler. While this works, the string constant will be used to construct a std::string at least in json_pointer(), and it would be slightly more efficient to pass the length parameter to the std::string constructor, so it does not need to do a strlen-operation to determine how much space to allocate for the string.

@nlohmann
Copy link
Owner

Fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants