2009-06-30から1日間の記事一覧

Boost.Lambdaを使用してvector<shared_ptr<T>>をソート

C++

*boost::lambda::_1で間接参照できたんですね。 #include <iostream> #include <vector> #include <string> #include <algorithm> #include <boost/lambda/lambda.hpp> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> struct person { int age; std::string name; person(int age, const std::string& name) : age(a…</boost/make_shared.hpp></boost/shared_ptr.hpp></boost/lambda/lambda.hpp></algorithm></string></vector></iostream>