未归类:

1. bind

占位符_1,_2 定义在 std::placeholders::_1
bind 不能完成对引用的捕获,只能对参数进行拷贝,使用引用 必须使用 std::ref函数

  1. foreach(words.begin(),words.end(),bind(print,ref(os),_1,' ')); // bind 不能捕获os的引用