-
-
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
[Question] Access to end() iterator reference #1242
Comments
Could you provide an example? |
We are doing a migration from rapidjson to your library: We have a custom class that uses internally your library, so for that reason we create an iterator adaptor. During the construction of our begin() and end() methods we call to the operator*(), both to the end() and begin(), but the end() iterators give us the error due to the assert. |
It is illegal to dereference an |
You can turn off assertions by defining the preprocessor macro |
Thanks, I will do that, I close this, thanks |
How can I access to the reference of the .end() iterator when there is an assert that forces to avoid it?
Maybe the question could look a little bit silly but I have problems with iterators because of this, and of course commenting the assert is just a short term and dirty solution to the problem.
json/single_include/nlohmann/json.hpp
Line 5304 in 186c747
The text was updated successfully, but these errors were encountered: