Mercurial > projects > ldc
diff dmd/template.h @ 1195:e961851fb8be
Merged DMD 1.042.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 03 Apr 2009 17:59:34 +0200 |
parents | 0b26cfb2d445 |
children | 8026319762be |
line wrap: on
line diff
--- a/dmd/template.h Fri Apr 03 17:02:52 2009 +0200 +++ b/dmd/template.h Fri Apr 03 17:59:34 2009 +0200 @@ -54,9 +54,7 @@ TemplateParameters *parameters; // array of TemplateParameter's TemplateParameters *origParameters; // originals for Ddoc -#if DMDV2 Expression *constraint; -#endif Array instances; // array of TemplateInstance's TemplateDeclaration *overnext; // next overloaded TemplateDeclaration @@ -66,10 +64,7 @@ Dsymbol *onemember; // if !=NULL then one member of this template TemplateDeclaration(Loc loc, Identifier *id, TemplateParameters *parameters, -#if DMDV2 - Expression *constraint, -#endif - Array *decldefs); + Expression *constraint, Array *decldefs); Dsymbol *syntaxCopy(Dsymbol *); void semantic(Scope *sc); int overloadInsert(Dsymbol *s); @@ -81,7 +76,7 @@ // void toDocBuffer(OutBuffer *buf); MATCH matchWithInstance(TemplateInstance *ti, Objects *atypes, int flag); - int leastAsSpecialized(TemplateDeclaration *td2); + MATCH leastAsSpecialized(TemplateDeclaration *td2); MATCH deduceFunctionTemplateMatch(Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, Objects *dedargs); FuncDeclaration *deduceFunctionTemplate(Scope *sc, Loc loc, Objects *targsi, Expression *ethis, Expressions *fargs, int flags = 0); @@ -108,6 +103,8 @@ * template Foo(valType ident : specValue) * For alias-parameter: * template Foo(alias ident) + * For this-parameter: + * template Foo(this ident) */ Loc loc; @@ -216,7 +213,7 @@ struct TemplateAliasParameter : TemplateParameter { /* Syntax: - * ident : specAlias = defaultAlias + * specType ident : specAlias = defaultAlias */ Type *specAliasT; @@ -317,7 +314,7 @@ #endif // Internal - static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs); + static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs, int flags); void semanticTiargs(Scope *sc); TemplateDeclaration *findTemplateDeclaration(Scope *sc); TemplateDeclaration *findBestMatch(Scope *sc);