降低圈复杂度

降低圈复杂度

用functional的方式降低圈复杂度

用stl algorithm代替for loop

https://blog.csdn.net/YyoulingL/article/details/84515924

outs.map(|x| x.m).collect()

boost::copy( outs | transformed([](auto x){return x->m;}),std::back_inserter(mouts))

std::transform(outs.begin(), outs.end(), std::back_inserter(mouts), [](auto x){return x->m;})

降低圈复杂度

https://zhuanlan.zhihu.com/p/29438120

posted on 2020-04-29 19:42  cutepig  阅读(754)  评论(0编辑  收藏  举报

导航