2009-02-04から1日間の記事一覧
C++0xでvariadic templateを使って可変数引数の数を数えるプログラムを組んでみる。 使ったのはg++ Ubuntu 4.3.2-1ubuntu12 オプションは g++ -g -Wall -std=c++0x -o variadic_templ variadic_templ.cpp #include <iostream> #include <typeinfo> template <typename... arg> struct length; temp</typename...></typeinfo></iostream>…