2014-05-26から1日間の記事一覧

Variadic Templateの(僕が今更ながら新しく知った)使い方

知った事など 継承させる struct Base1{}; struct Base2{}; // すべての型引数を継承 template<typename... Args> struct Derived : Args... { int a; }; int main(){ Derived<Base1,Base2> a; } mapして包含する(直接保持は無理) struct Base1{}; struct Base2{}; template<typename... Ts> struct holder</typename...></base1,base2></typename...>…

tupleの実装(5.26)

途中経過 http://melpon.org/wandbox/permlink/iKjxuweUPGP5Py9x