相关疑难解决方法(0)

C++函数对象返回`p-> first`和`p-> second`

是否有一个返回内建函数对象p->firstp->second,让我可以高兴地写

transform(m.begin(),m.end(),back_inserter(keys),get_first);
transform(m.begin(),m.end(),back_inserter(vals),get_second);
Run Code Online (Sandbox Code Playgroud)

基于STL的解决方案是最好的,boost解决方案是第二好的.

是的,我知道boost::lambda,我不想开始使用它.

c++ boost stl

10
推荐指数
2
解决办法
1320
查看次数

标签 统计

boost ×1

c++ ×1

stl ×1