高阶c++

模板就是宏。模板能不能再往一步?

http://perilla.codeplex.com/

enhanced c++ template grammar:

rule 1:

c++ identifier include :
const name
variable name
class name
struct name
function name
namespace
code block name (new)
expression name (new)

c++ original temple include:
class template
function template
and template parameter can only be type name or const

enhanced temple include all kind of identifier above and template parameters can be all of identifier above.

rule 2:
AST reflection can be accessed in the template.

rule 3:
identifier can be operate as string, and transfer each other.

rule 4:
some check can be done at pre-compile stage.

rule 5:
alias is used for simply the identifier.

上一篇:[源码分析] 消息队列 Kombu 之 Producer


下一篇:未在本地计算机上注册“OraOLEDB.Oracle.1”提供程序。