On second though, maybe it can be done at compile time, with this: http://b.atch.se/posts/constexpr-counter/
On second though, maybe it can be done at compile time, with this: http://b.atch.se/posts/constexpr-counter/