2010-08-28から1日間の記事一覧

boost::tuple

#include <assert.h> #include <boost/tuple/tuple.hpp> int main(){ using boost::tuple; namespace tuples = boost::tuples; tuple<int, float, char> hoge(20, 3.14f, 'w'); assert( hoge.get<0>() == 20 ); assert( hoge.get<1>() == 3.14f ); assert( hoge.get<2>() == 'w' ); typedef tuple<int, float, double> my_t…</int,></int,></boost/tuple/tuple.hpp></assert.h>