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
When using the subscript operator [] on a vector<bool> i.e
vector<bool> a; a.push_back(true); cout << a[0];
results in:
error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool' 87 | return std::vector::operator[](i);
Tested on gcc 11.2.0 and clang 13.0 for C++11
The text was updated successfully, but these errors were encountered:
@ivanusick Did you check the true is the "bool" type? I guess the error be actually from a.push_back(true);.
true
a.push_back(true);
Sorry, something went wrong.
No branches or pull requests
When using the subscript operator [] on a vector<bool> i.e
results in:
error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool'
87 | return std::vector::operator[](i);
Tested on gcc 11.2.0 and clang 13.0 for C++11
The text was updated successfully, but these errors were encountered: