Metaprogramming in C++ and in D

后端 未结 10 1997
生来不讨喜
生来不讨喜 2021-01-30 04:46

The template mechanism in C++ only accidentally became useful for template metaprogramming. On the other hand, D\'s was designed specifically to facilitate this. And apparently

10条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-30 05:39

    I believe nothing is better qualified to show the incredible power (TM) of the D template system than this renderer I found years ago:

    The compiler output

    Yes! This is actually what is generated by the compiler ... it is the "program", and quite a colourful one, indeed.

    Edit

    The source seems to be back online.

提交回复
热议问题