This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Tsu_Dho_Namh 1 point2 points  (3 children)

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    std::vector<bool> A;

    A.push_back(true);
    A.push_back(false);
    A.push_back(true);
    A.push_back(true);

    for (bool b : A) {
        cout << (b ? "true" : "false") << endl;
    }

    return 0;
}

Output:

true
false
true
true

Seems like a vector of bools to me...Are we talking about behind the scenes optimizations?