Category : embedded

I’m implementing a compile time dispatcher which makes use of static polymorphism and metaprogramming. I have a list of types which I would like to instantiate into a runtime std::array. struct Test { typedef std::integral_constant<int,0> nop; typedef std::integral_constant<int,1> A; typedef std::integral_constant<int,2> B; typedef std::integral_constant<int,3> C; using list = mp_list<A, B, C>; // mp_list expands to: ..

Read more