UDAs - Restrict to User Defined Types?

Adam D. Ruppe destructionator at gmail.com
Wed Nov 7 15:31:33 PST 2012


I think restricting to user types makes sense because the type is 
how you'd actually do anything with it.

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?


More information about the Digitalmars-d mailing list