My figuring is you'd generally do something like this:
foreach(t; __traits(getAttributes, foo)) static if(is(t == WhatICareAbout)) { // use it }And if what you care about is something like string or int, how do you know it semantically means what you think it means?