Skip to content

Commit

Permalink
Document the non-recursive nature of getSymbolsByUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Jun 19, 2015
1 parent b3c2d04 commit bbdf899
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions std/traits.d
Expand Up @@ -6556,6 +6556,8 @@ unittest

/**
* Gets all symbols within `symbol` that have the given user-defined attribute.
* This is not recursive; it will not search for symbols within symbols such as
* nested structs or unions.
*/
template getSymbolsByUDA(alias symbol, alias attribute)
{
Expand All @@ -6579,6 +6581,11 @@ unittest
int b;
@Attr void doStuff() {}
void doOtherStuff() {}
static struct Inner
{
// Not found by getSymbolsByUDA
@Attr int c;
}
}

// Finds both variables and functions with the attribute, but
Expand Down

0 comments on commit bbdf899

Please sign in to comment.