I don't see the value in producing an error instead of using the meta-program to produce an unrolled loop with mpl::for_each that actually prints the sequence at run-time. ;)
Seriously, the MPL is a powerful and surprising beast but in most
cases some preprocessor library like Boost.Preprocessor or Chaos is
unavoidable to really make it useful. In fact, you can write this
complete program with the preprocessor and I would actually prefer it
(or const expression meta-programming).
Comments
I don't see the value in producing an error instead of using the meta-program to produce an unrolled loop with mpl::for_each that actually prints the sequence at run-time. ;)
Seriously, the MPL is a powerful and surprising beast but in most cases some preprocessor library like Boost.Preprocessor or Chaos is unavoidable to really make it useful. In fact, you can write this complete program with the preprocessor and I would actually prefer it (or const expression meta-programming).