Mapping Types to Values (in C++)
gpfault.net
gpfault.net
What I would love to see it a completely generic type-to-value map ToValue<T> for ANY T, possibly template types, and without any sort of registration required. If the results are integers or otherwise ordered, they could then be used for compile-time ordered data structures like RB trees or heaps, for the implementation of some metaprogramming concepts.
Granted I believe that is impossible in plain C++.
On second though, maybe it can be done at compile time, with this: http://b.atch.se/posts/constexpr-counter/