<div dir="ltr">This thread completely diverged from the original post, which was propsing `::` instead of `from!`:<div><br><div><div style="font-size:12.8px">```</div><div style="font-size:12.8px">void fun(T)(std.stdio::File input, T value) if (std.traits::isIntegral!T) {...}</div><div style="font-size:12.8px">```<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">instead of:</div><div style="font-size:12.8px"><div><br></div><div>```</div><div>void fun(T)(Module!"std.stdio".File input, T value) if (Module!"std.traits".<wbr>isIntegral!T) {...}</div><div>```</div><div><br></div><div>I see it as a clear improvment in readability (see original post for details along with shortcomings of `from!` approach )</div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 15, 2017 at 11:39 AM, Andrei Alexandrescu via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 02/15/2017 06:20 AM, Daniel N wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wednesday, 15 February 2017 at 09:22:14 UTC, Daniel N wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
template every(T...)<br>
{<br>
    template satisfies(U...)<br>
    {<br>
        enum satisfies = true;<br>
    }<br>
}<br>
</blockquote>
<br>
(lunch-break => time to hack D!)<br>
<br>
template every(T...)<br>
{<br>
  template satisfies(U...)<br>
  {<br>
    enum satisfies = {<br>
      foreach(t; T)<br>
        foreach(u; U)<br>
      if(!u!t)<br>
            return false;<br>
      return true;<br>
    }();<br>
  }<br>
}<br>
</blockquote>
<br></div></div>
That looks pretty neat. Can you find 4-5 cases in which this could be used gainfully in Phobos? Thanks! -- Andrei<br>
<br>
<br>
</blockquote></div><br></div>