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

Amazonでの予約が開始されました。

C++

『C++テンプレートテクニック』がAmazonで予約できるようになりました。 目次はこんな感じになってます。 Chapter1 テンプレート前史 Chapter2 テンプレートの基礎 Chapter3 Generic Programmingの基礎 Chapter4 テンプレートメタプログラミング Chapter5 SF…

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

C++

take_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> …</template></false,></class></true,></class></bool>