2010-09-17から1日間の記事一覧

zip

C++

2つのIterableが並行に(tupleにして)値を出せるようにします。長さが違う場合は短いほうにあわせます。 #include <tuple> #include "itertools.h" using namespace std; using namespace itertools; template<typename T, typename U> class cZip : public cIterable<tuple<T,U>> { shared_ptr<cIterable<T>> gen1;</citerable<t></tuple<t,u></typename></tuple>…