Piotr Szturmaj wrote:
and instead of writing hash!SHA1("abc"), write SHA1.hash("abc");
Another example:
template MutablePointer(T)
{
alias PointerTarget!(Unqual!T) MutablePointer;
}
alias const(int) CInt;
static assert(is(MutablePointer!CInt == int*));
Alternative syntax:
template MutablePointer(T)
{
alias T.Unqual.PointerTarget MutablePointer;
}
alias const(int) CInt;
static assert(is(CInt.MutablePointer == int*));
This is just for convenience, as with UFCS. Second syntax is IMO a lot
cleaner.
