¡Nuevo!  por fin disponible la versión 5 de OrganiZATOR
Descubre un nuevo concepto en el manejo de la información.
La mejor ayuda para sobrevivir en la moderna jungla de datos la tienes aquí.

Curso C++

[Home]  [Inicio]  [Índice]


Gramática C++ de template

§1 Sintaxis:

La gramática C++ admite una cierta variedad sintáctica en la utilización del especificador template:

template-declaration:

exportopt template < template-parameter-list > declaration

template-parameter-list:

template-parameter

template-parameter-list, template-parameter

template-parameter:

type-parameter

parameter-declaration

type-parameter:

class identifieropt

class identifieropt = type-id

typename identifieropt

typename identifieropt = type-id

template < template-parameter-list > class identifieropt

template < template-parameter-list > class identifieropt = template-name

templete-id:

template-name < template-argument-listopt >

template-name:

identifier

template-argument-list:

template-argument

template-argument-list , template-argument

template-argument:

assignment-expression

type-id

template-name

explicit-instantiation:

template declaration

explicit-specialization:

template < > declaration