降低圈复杂度


降低圈复杂度

用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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM