syntax sugar: std.path::buildPath instead of from!"std.path".buildPath
Daniel Nielsen via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 16 09:51:20 PST 2017
On Wednesday, 15 February 2017 at 19:39:52 UTC, Andrei
Alexandrescu wrote:
> On 02/15/2017 06:20 AM, Daniel N wrote:
>> 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;
>> }();
>> }
>> }
>
> That looks pretty neat. Can you find 4-5 cases in which this
> could be used gainfully in Phobos? Thanks! -- Andrei
Thanks, I'll get back to you. Unfortunately I just contracted
fever, not fit to leave bed. Nothing dangerous, just am K.O.
More information about the Digitalmars-d
mailing list