On Monday, 7 January 2013 at 15:37:48 UTC, Tove wrote:
but this seems to work too?

import std.traits;

struct my_struct
{
private:
  @(1) int t1;
  @(2) int t2;
  @(3) int t3;
}
void main()
{
  foreach(m; __traits(allMembers, my_struct))
pragma(msg, __traits(getAttributes, __traits(getMember, my_struct, m)));
}

»private« means »accessible from this module« – are you running your tests with my_struct defined in a different module?

David

Reply via email to