http://d.puremagic.com/issues/show_bug.cgi?id=9065
--- Comment #21 from Manu <turkey...@gmail.com> 2012-11-26 23:24:17 PST --- (In reply to comment #20) > (In reply to comment #12) > > (In reply to comment #11) > > OK. I understood that Manu says. And my yesterday comment was completely > wrong. > Sorry for my misunderstanding. > > Certainly, isFunction is an important template which lacks in std.traits. > Existing other function traits, isSomeFunction, isCallble, FunctionTypeOf, > return true even if given function pointer or delegate. I can agree with the > behavior is sometimes obstacle. > > > Blending traits about type and symbol is not a purpose of std.traits. > > And more, mixing symbol and type is *a design* of std.traits. I had > misunderstood at the point. isSomeFunction is an example. > > /** > Detect whether >>symbol or type<< $(D T) is a function, a function pointer > or a delegate. > */ > template isSomeFunction(T...) { ... } > > I challenged implementing proposed template isVariable. Is this what you want? > > https://gist.github.com/4152297 It looks good, although I can't test it now. Does isVariable deal with properties (which I would say are NOT variables). And how about an isProperty? That's really hard to detect... I'm not sold on the term isManifestConstant, I'm sure no non-compiler developer would have ever heard that term before. I've never seen it in any docs before, and they're declared with 'enum', that's what most people will call it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------