Challenge
Andrea Fontana via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 3 06:46:43 PDT 2016
On Monday, 3 October 2016 at 13:19:19 UTC, Manu wrote:
> Fill in the blank...
> I'm having a really hard time with this. I've made it work with
> a
> mountain of code, and I want to see what others come up with...
>
> If you succeed, put it in std.traits!
Pretty easy:
template isStaticMember(T, string member)
{
enum bool isStaticMember =
!(member=="X" || member=="Y" || member=="Y.i" || member=="S"
|| member=="C" ||
member=="g" || member=="fpm" || member=="m" || member=="m2" ||
member=="iom" || member=="p");
}
Ok, I'm joking.
More information about the Digitalmars-d
mailing list