2009-02-06から1日間の記事一覧
複数の型をlistに束縛してnthで取り出してみる。 中身はlispちっくにconsセルでつなげてます。 #include <iostream> #include <typeinfo> struct nil_t {}; template <typename... args> struct cons_cell; template <typename first, typename... rest> struct cons_cell<first, rest...> { typedef first car; typedef cons_cell<rest...> cdr; }; template </rest...></first,></typename></typename...></typeinfo></iostream>