is(x = module) vs. __traits(isModule, x)

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Oct 8 14:08:40 UTC 2020


On Thu, Oct 08, 2020 at 12:54:49PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Thursday, 8 October 2020 at 10:11:59 UTC, Max Samukha wrote:
> > Wrapping __traits in templates is a necessity if you want to use
> > them for anything interesting (such as passing them to higher order
> > functions):
> 
> I kinda wish we had a template lambda.

Me too!!!  I've been avoiding to use Filter, et al, because I'm forced
to declare a bunch of helper templates just for trivial predicates. If
lambda syntax could be extended to templates, that would make it much
nicer to use.


T

-- 
Fact is stranger than fiction.


More information about the Digitalmars-d mailing list