Вот такой код
#include <iostream>
int main() {
bool b = true;
b++;
std::cout << b;
}
Был валиден до С++17, но
<source>:6:5: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
Вот так вот.
C+ C++: Хроники Дурки🚑 @cpp_durka · 916 subscribers #include <iostream>
int main() {
bool b = true;
b++;
std::cout << b;
}
<source>:6:5: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17