I am getting the warning only while accessing address of element in vector of bool. For vector of other data types like int i don't get any warning.
eg
vector<bool> boolVect;
boolVect.push_back(false);
if (boolVect.size() > 0) {
cout << &boolVect[0] << endl;
}
I get warning "taking address of temporary" at statement "cout << &boolVect[0] << endl;"
Can someone please clarify?