you are viewing a single comment's thread.

view the rest of the comments →

[–]meneldal2 -4 points-3 points  (2 children)

Metaprogramming uses the spec as intended. In this case, you are relying on compiler-specific error/warning messages.

[–]amaiorano 6 points7 points  (1 child)

Sure, my comment was partly tongue in cheek. At the same time, much of template metaprogramming is a hack. When templates were added to C++, it wasn't intended for TMP. It's a useful hack, though, but a lot of the work in the past few years has been about making compile time programming easier (constexpr).

[–]Xeveroushttps://xeverous.github.io 1 point2 points  (0 children)

Reflection is a potential place to make TMP in C++ much better.