myoukakuのブログ

C++でゲームエンジンを作っていきます。

2014-10-25から1日間の記事一覧

static_mapのヘルパー関数、make_static_mapを書いた(1)

C++

static_mapのヘルパー関数、make_static_mapを書いた(0) - myoukakuのブログ の続き まず、以下のように書いてみました。 template <typename T, typename ... Types> struct head { using type = T; }; template <typename ... Types> struct key_type { using type = typename head<Types...>::type::first_type; }; templ</types...></typename></typename>…