<br><br><div class="gmail_quote">On Tue, Aug 3, 2010 at 22:04, Andrej Mitrovic <span dir="ltr">&lt;<a href="mailto:andrej.mitrovich@gmail.com">andrej.mitrovich@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Oh and there&#39;s a shorter way to write this example, by using isInputRange from std.range, like so:<br><br>if (isInputRange!R &amp;&amp; is(typeof({x = fun(x, range.front);})))<br></blockquote><div><br></div><div>Does this work, without the () after the } ?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This was in TDPL (except the {}&#39;s which are missing).</blockquote><div><br></div><div>As I said, abstracting away common constraints is a common trick. Have a look at std.range, you&#39;ll see a bunch of these.</div>
<div><br></div><div><br></div><div>Philippe </div></div>