метапрограммирование

Metacomputing types in Boost MPL

I have a task: A sequence of types is given. Check that they are all classes and arrange them so that the derived classes ar ... the corresponding types in places, if the first is the ancestor of the second. Tell me how to implement this using Boost MPL?

Listing structure fields

There is a structure and functions: struct S { T1 t1; T2 t2; // и т.д. } s; template <class T> f(const T& ... You can't use third-party libraries, but you can use macros, templates, and generally all the available features of C++14.