syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 15 03:20:58 PST 2017


On Wednesday, 15 February 2017 at 09:22:14 UTC, Daniel N wrote:
> template every(T...)
> {
> 	template satisfies(U...)
> 	{
> 		enum satisfies = true;
> 	}
> }

(lunch-break => time to hack D!)

template every(T...)
{
   template satisfies(U...)
   {
     enum satisfies = {
       foreach(t; T)
         foreach(u; U)
	  if(!u!t)
             return false;
       return true;
     }();
   }
}



More information about the Digitalmars-d mailing list