Try something like this:

foreach (i, dummy; foo.tupleof)
{
    alias Tuple!(__traits(getAttributes, foo.tupleof[i])) tp;
    pragma(msg, tp);
}


Ok so that is because ref does not work with foreach on tuples. Somehow I thought that got fixed.
Anyways, with your suggestion I get a strange error.

Error: first argument is not a symbol
tuple(false)

Regards
- Puneet