如何执行以下操作?
vector<int> vec(100);
boost::iota(vec, 0);
static int counter = 0;
boost::for_each(vec,
cout << constant(left) << constant(setw(5))
<< _1 * 2 << (++var(counter) % 5 == 0 ? "\n" : " "));
我的错误信息是:
error: value of type '...' is not contextually convertible to 'bool'