View source code
Display the source code in dmd/templatesem.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aBugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.
Module dmd.templatesem
Template semantics.
Documentation
https://dlang.org/phobos/dmd_templatesem.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/templatesem.d
Functions
| Name | Description |
|---|---|
declareParameters(ti, sc)
|
Declare parameters of template instance, initialize them with the template instance arguments. |
findBestMatch(ti, sc, argumentList)
|
Find the TemplateDeclaration that matches this TemplateInstance best. |
findTempDecl(ti, sc, pwithsym)
|
Find template declaration corresponding to template instance. |
functionResolve(m, dstart, loc, sc, tiargs, tthis, argumentList, errorHelper)
|
Given function arguments, figure out which template function to expand, and return matching result. |
getConstraintEvalError(td, tip)
|
Destructively get the error message from the last constraint evaluation |
isDiscardable(ti)
|
|
leastAsSpecialized(sc, td, td2, argumentList)
|
Determine partial specialization order of td vs td2.
|
matchArg(tp, instLoc, sc, tiargs, i, parameters, dedtypes, psparam)
|
Match to a particular TemplateParameter. |
matchWithInstance(sc, td, ti, dedtypes, argumentList, flag)
|
Given that ti is an instance of this TemplateDeclaration, deduce the types of the parameters to this, and store those deduced types in dedtypes[]. |
needsCodegen(ti)
|
Returns true if this is not instantiated in non-root module, and is a part of non-speculative instantiatiation. |
semanticTiargs(ti, sc)
|
Run semantic on the elements of ti.
|
templateDeclarationSemantic(sc, tempdecl)
|
Perform semantic analysis on template. |
TemplateInstance_semanticTiargs(loc, sc, tiargs, flags, atd)
|
Run semantic of tiargs as arguments of template. |
updateTempDecl(ti, sc, s)
|
Confirm s is a valid template, then store it. |
Structs
| Name | Description |
|---|---|
TemplateInstanceBox
|
This struct is needed for TemplateInstance to be the key in an associative array. Fixing https://issues.dlang.org/show_bug.cgi?id=15813 would make it unnecessary. |
Authors
License
Copyright © 1999-2026 by the D Language Foundation | Page generated by ddox.