// any_of example
#include <iostream>     // std::cout
#include <algorithm>    // std::any_of
#include <vector> 

int main () {
  std::vector<bool> foo = {true, true, true};

  if ( !std::any_of(foo.begin(), foo.end(), [](bool i){return i == false;}) )
    std::cout << "All elements are true\n";

  return 0;
}