Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Issue 9608 - Implement template parameter introspection traits" #5496

Closed
wants to merge 2 commits into from

Conversation

MetaLang
Copy link
Member

@MetaLang MetaLang commented Mar 4, 2016

It's the simplest change I could make to get it to compile. Suggestions welcome.

AndrejMitrovic and others added 2 commits March 3, 2016 20:49
The list of traits and their usage:

isTemplateTypeParam - Check whether the template parameter is a type parameter. E.g. template Foo(T)

isTemplateValueParam - Check whether the template parameter is a value parameter. E.g. template Foo(int Val)

isTemplateAliasParam - Check whether the template parameter is an alias parameter. E.g. template Foo(alias symbol)

isTemplateThisParam - Check whether the template parameter is a 'this' parameter. E.g. template Foo(this T)

isTemplateVariadicParam - Check whether the template parameter is a variadic parameter. E.g. template Foo(Args...)

getTemplateParamCount - Get the number of template parameters. E.g. template(A, B, C) => 3 parameters

getTemplateParamIdent - Get the name of a specific template parameter. E.g. template(A, B) => 0 == "A", 1 == "B"

getTemplateParamType - If the template parameter is a value parameter, get its type. E.g. template(int Val) => int

getTemplateParamSpec - If the template parameter has a specialization, retrieve it. E.g. template(T : int) => int

getTemplateParamDefault - If the template parameter has a default value, retrieve it. E.g. template(T = int) => int
@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
9608 Add introspection for templates

@AndrejMitrovic
Copy link
Contributor

We're putting this (and #5201) on hold until discussions have been made. See the last comments made in that PR. Sorry for taking the effort to resurrect this yourself @MetaLang, but let's try to get a consensus with the community first. :) Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants