This question is similar to this question: What is the most elegant way to check if all values in a boolean array are true?
But for vector<bool> in c++.
How can use all_of for this purpose (for example I want to check the value between ranges, element 10 to 20) so I can not use begin and end.