a constant-expression counter in C++

来源:http://b.atch.se/posts/constexpr-counter/