If I have definitions like:
typedef map Foo_map_1 typedef map Foo_map_2 typedef map Foo_
This is seems easy enough even for the limited C++ metaprogramming power:
#include #include template struct NMap { typedef std::map::type> type; }; template struct NMap<1, K, V> { typedef std::map type; }; int main(int argc, const char *argv[]) { NMap<3, int, std::string>::type m; m[1][2][3] = "Test"; return 0; }