你在C ++中看到的元编程的最酷的例子是什么? [英] What are the coolest examples of metaprogramming that you've seen in C++?

查看:85
本文介绍了你在C ++中看到的元编程的最酷的例子是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这个问题存在,因为它有
的历史意义,但它不是
认为一个好的,主题的问题
这个网站,所以请不使用
作为证据,您可以在这里询问类似的
问题。

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here.

更多信息: http://stackoverflow.com/faq






你在C ++中看到的元编程的最酷的例子是什么?

你在C ++中看到的元编程的一些实际用途是什么?


What are the coolest examples of metaprogramming that you've seen in C++?
What are some practical uses of metaprogramming that you've seen in C++?

推荐答案

我个人认为 Boost.Spirit 是元编程的一个惊人的例子。它是一个完整的解析器生成器,它允许您使用C ++语法表达语法。

Personally, I think Boost.Spirit is a pretty amazing example of meta-programming. It's a complete parser generator that lets you express grammars using C++ syntax.

这篇关于你在C ++中看到的元编程的最酷的例子是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆