View source code
Display the source code in dmd/templatesem.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla 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 using local clone.

Module dmd.templatesem

Template semantics.

Documentation

https://dlang.org/phobos/dmd_templatesem.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/templatesem.d

Functions

NameDescription
createScopeForTemplateParameters(td, ti, sc) Create a scope for the parameters of the TemplateInstance ti in the parent scope sc from the ScopeDsymbol paramsym.
declareParameter(td, sc, tp, o) Declare template parameter tp with value o, and install it in the scope sc.
deduceFunctionTemplateMatch(td, ti, sc, fd, tthis, argumentList) Match function arguments against a specific template function.
evaluateConstraint(td, ti, sc, paramscope, dedargs, fd) Check to see if constraint is satisfied.
formatParamsWithTiargs(parameters, tiargs, variadic, buf) Append to buf a textual representation of template parameters with their arguments.
functionResolve(m, dstart, loc, sc, tiargs, tthis, argumentList, errorHelper) Given function arguments, figure out which template function to expand, and return matching result.
leastAsSpecialized(sc, td, td2, argumentList) Determine partial specialization order of td vs td2.
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[].
templateDeclarationSemantic(sc, tempdecl) Perform semantic analysis on template.

Authors

Walter Bright

License

Boost License 1.0