避免手动创建lambda来包装对new []:的调用,以用作std :: generate中的生成器函数
精简版
Currently, I manually create a lambda function for the new [], as follows:
[](){ return new double[3]; }
This lambda is later used as a generator function in the call to std::generate:
std::generate(vec.begin(), vec.end(), [](){ return new double[3]; ...