We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Exercise 16.12
Bug, end() and cend() member function of Blob have incorrect boundary check condition.
end()
cend()
Blob
e.g.
#include "ex16_12_blob.h" #include <iostream> #include <string> int main() { Blob<std::string> sb1{"a", "b", "c"}; auto p{sb1.cbegin()}; std::cout << *p << std::endl; }
Code above will throw exception as follow:
terminate called after throwing an instance of 'std::out_of_range' what(): dereference past end
And the member function end() has the same problem.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Exercise information
Exercise 16.12
Question or Bug
Bug,
end()
andcend()
member function ofBlob
have incorrect boundary check condition.e.g.
Code above will throw exception as follow:
And the member function
end()
has the same problem.Your enviroment information
The text was updated successfully, but these errors were encountered: