vector<int> vecInt;
std::all_of(vecInt.begin(), vecInt.end(), [](int i){return i == 0;});
//返回值为true
std::all_of 空容器的返回值为true
最新推荐文章于 2024-07-11 17:21:10 发布
vector<int> vecInt;
std::all_of(vecInt.begin(), vecInt.end(), [](int i){return i == 0;});
//返回值为true