2009-04-13から1日間の記事一覧

可変引数テンプレートでの型リスト - drop_while

C++

drop_whileは先頭から述語を満たす型を除外するメタ関数です。 template <bool Cond, class Then, class Else> struct if_c; template <class Then, class Else> struct if_c<true, Then, Else> { typedef Then type; }; template <class Then, class Else> struct if_c<false, Then, Else> { typedef Else type; }; template <template <class T> c…</template></false,></class></true,></class></bool>