异常:如果谓词或迭代器上的操作抛出异常,则抛出异常。 例子: // C++ code to demonstrate working ofall_of()#include<vector>#include<algorithm>#include<iostream>intmain(){std::vector<int> v(10,2);// illustrateall_ofif(std::all_of(v.cbegin(), v.cend(), [](inti){returni %2==0; })...