<div dir="ltr">On Sat, Sep 21, 2013 at 3:12 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I don't believe this is a correct change.<br>
<br>
    std::vector<int> v( {}, my_weird_iterator );<br>
<br>
... cannot deduce the type of `_InputIterator`.</blockquote><div><br></div><div>This is a prime candidate for my function-template-parameter-default enable_if approach. For details, see <a href="http://www.boost.org/doc/libs/1_54_0/libs/utility/enable_if.html#sec:enable_if_0x">http://www.boost.org/doc/libs/1_54_0/libs/utility/enable_if.html#sec:enable_if_0x</a> . By using this approach, you'd avoid any potential corner-case deduction issues, since the SFINAE happens as a part of forming the template parameter kind, separate from any function parameters themselves. The documentation linked is for boost::enable_if, but it will work perfectly fine with std::enable_if as well. If you use this approach, be sure that the enable_if is used when forming the template parameter kind as is shown in the documentation and not as a part of the default argument itself.</div>
</div><div><br></div>-- <br>-Matt Calabrese
</div></div>