www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Template Arguments

reply "Carlos Smith" <carlos-smith sympatico.ca> writes:
In the the definition of template arguments:

TemplateArgument:
   Type
   AssignExpression
   Symbol


What does Symbol stands for ?

Carlos
Feb 18 2007
parent reply Kirk McDonald <kirklin.mcdonald gmail.com> writes:
Carlos Smith wrote:
 In the the definition of template arguments:
 
 TemplateArgument:
    Type
    AssignExpression
    Symbol
 
 
 What does Symbol stands for ?
 
 Carlos

Any symbol which can be resolved at compile-time, such as, for example, a function, can be passed as a template argument. The grammar doesn't define what "Symbol" is, specifically, but it might not be incorrect to think of it as the same as "Identifier". -- Kirk McDonald http://kirkmcdonald.blogspot.com Pyd: Connecting D and Python http://pyd.dsource.org
Feb 18 2007
parent "Carlos Smith" <carlos-smith sympatico.ca> writes:
"Kirk McDonald" <kirklin.mcdonald gmail.com> wrote in 
message :

: Any symbol which can be resolved at compile-time, such as, 
for example,
: a function, can be passed as a template argument. The 
grammar doesn't
: define what "Symbol" is, specifically, but it might not be 
incorrect to
: think of it as the same as "Identifier".

Thanks.

Well, it should be define somewhere.
This is part of the language definition spec !
Feb 19 2007