求几个用lambda写的函数解决思路

求几个用lambda写的函数
知道boost的lambda的厉害,但自己对boost又不熟悉,所以请教大家写一下例子

函数主要用于vector或list


比如有个结构体 
typedef struct tagTest
{
int x;
char y[128];
}tTest;
声明多个对象压入vector
然后用lambda 和bind 完成对同时满足符合条件的 x和y的tTest的查找,并取出来

------解决方案--------------------
here is one
C/C++ code

#include <algorithm>
#include <iostream>
#include <vector>

struct test
{
 void print () const { std::cout << "test::print() of " << this << std::endl; }
};

int main ()
{
 std::vector<test> vt(10);
 std::for_each(vt.begin(),vt.end(),[](test const& t){t.print();});
 return 0;
}