A partial template application literal syntax

bearophile bearophileHUGS at lycos.com
Mon Sep 17 14:56:32 PDT 2012


Denis Shelomovskij:

> Just want to mention about existent (and more flexible than 
> this syntax) library solution.
> Search for `Bind` here:
> https://bitbucket.org/denis_sh/misc/src/tip/stdd/typetuple.d

Its ddocs show this:

import std.traits;

static assert(is(staticBind!(CommonType, long, allArgs).Res!int 
== long));
static assert(!staticBind!(isImplicitlyConvertible, arg!0,   
int).Res!long);
static assert( staticBind!(isImplicitlyConvertible, int  , 
arg!0).Res!long);

alias staticBind!(staticMap, Unqual, allArgs).Res UnqualAll;
static assert(is(UnqualAll!(const(int), immutable(bool[])) T) &&
               T.length == 2 && is(T[0] == int) && is(T[1] == 
immutable(bool)[]));


I have understood the meaning and usage of those "type lambdas" 
that use ? in Scala as soon I have seen them, while I don't get 
much from this noisy stuff :-(

Bye,
bearophile


More information about the Digitalmars-d mailing list