Skip to content

Commit

Permalink
enhance __traits(identifier) to pick the identifier out of a paramete…
Browse files Browse the repository at this point in the history
…r list tuple
  • Loading branch information
WalterBright committed Nov 4, 2012
1 parent 400b5ef commit 49cbab4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions std/traits.d
Expand Up @@ -525,8 +525,7 @@ template ParameterIdentifierTuple(func...)
{
template Get(size_t i)
{
enum get = (PT[i..i+1] args) => __traits(identifier, args[0]);
enum Get = get(PT[i].init);
enum Get = __traits(identifier, PT[i..i+1]);
}
}
else static if (is(FunctionTypeOf!func PT == __parameters))
Expand Down

0 comments on commit 49cbab4

Please sign in to comment.