<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: How to Make SFINAE Pretty &#8211; Part 1: What SFINAE Brings to Code	</title>
	<atom:link href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 07 Jul 2019 09:16:17 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Dusan Jovanovic		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1149</link>

		<dc:creator><![CDATA[Dusan Jovanovic]]></dc:creator>
		<pubDate>Tue, 24 Jul 2018 07:41:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1149</guid>

					<description><![CDATA[Good and sober text on SFINAE ... Although, one might ask if SFINAE was such a good concept why do we need (c++20) concepts, at all :)]]></description>
			<content:encoded><![CDATA[<p>Good and sober text on SFINAE &#8230; Although, one might ask if SFINAE was such a good concept why do we need (c++20) concepts, at all 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nick Harris		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1018</link>

		<dc:creator><![CDATA[Nick Harris]]></dc:creator>
		<pubDate>Sun, 27 May 2018 00:12:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1018</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1016&quot;&gt;Jonathan Boccara&lt;/a&gt;.

I believe so!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1016">Jonathan Boccara</a>.</p>
<p>I believe so!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1016</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Fri, 25 May 2018 11:12:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1016</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1011&quot;&gt;Nick Harris&lt;/a&gt;.

I hadn&#039;t considered this approach! So do you mean that the template function is SFINAEd away when it is a redefinition of the non-template one?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1011">Nick Harris</a>.</p>
<p>I hadn&#8217;t considered this approach! So do you mean that the template function is SFINAEd away when it is a redefinition of the non-template one?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1015</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Fri, 25 May 2018 11:04:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1015</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1002&quot;&gt;Liquidify&lt;/a&gt;.

The result of enable_if is void when the condition is true. Otherwise it fails to be instantiated at all, because it falls back to the definition of enable_if that doesn&#039;t have an underlying type. Does that make sense?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1002">Liquidify</a>.</p>
<p>The result of enable_if is void when the condition is true. Otherwise it fails to be instantiated at all, because it falls back to the definition of enable_if that doesn&#8217;t have an underlying type. Does that make sense?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1014</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Fri, 25 May 2018 11:02:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1014</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1001&quot;&gt;Michael Ellery&lt;/a&gt;.

You are absolutely right Michael. I fixed this error, thanks.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1001">Michael Ellery</a>.</p>
<p>You are absolutely right Michael. I fixed this error, thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nick Harris		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1011</link>

		<dc:creator><![CDATA[Nick Harris]]></dc:creator>
		<pubDate>Tue, 22 May 2018 18:23:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1011</guid>

					<description><![CDATA[So what am I missing here? Simply forcing the rvalue version of f to be a template 
allows the compiler to distinguish properly between f and f as 
the previous function prevents f from being created. So 
wouldn&#039;t all that is needed be:

template 
class MyClass
{
public:

    void f(T const &#038;t) { cout &#060;&#060; &#034;lvalue&#034; &#060;&#060; endl; }
    template 
    void f(T &#038;&#038;t) { cout &#060;&#060; &#034;rvalue&#034; &#060;&#060; endl; }
};

Using this template:

    int i = 0;
    MyClass{}.f(i);                //prints lvalue
    MyClass{}.f(move(i));     //prints rvalue
    MyClass{}.f(i);              //print lvalue
    MyClass{}.f(move(i));   //compiler error due to T=const int&#038; requires lvalue]]></description>
			<content:encoded><![CDATA[<p>So what am I missing here? Simply forcing the rvalue version of f to be a template<br />
allows the compiler to distinguish properly between f and f as<br />
the previous function prevents f from being created. So<br />
wouldn&#8217;t all that is needed be:</p>
<p>template<br />
class MyClass<br />
{<br />
public:</p>
<p>    void f(T const &amp;t) { cout &lt;&lt; &quot;lvalue&quot; &lt;&lt; endl; }<br />
    template<br />
    void f(T &amp;&amp;t) { cout &lt;&lt; &quot;rvalue&quot; &lt;&lt; endl; }<br />
};</p>
<p>Using this template:</p>
<p>    int i = 0;<br />
    MyClass{}.f(i);                //prints lvalue<br />
    MyClass{}.f(move(i));     //prints rvalue<br />
    MyClass{}.f(i);              //print lvalue<br />
    MyClass{}.f(move(i));   //compiler error due to T=const int&amp; requires lvalue</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Liquidify		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1002</link>

		<dc:creator><![CDATA[Liquidify]]></dc:creator>
		<pubDate>Sat, 19 May 2018 05:26:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1002</guid>

					<description><![CDATA[&quot;If that Condition is false, enable_if has no underling type.&quot;


If the condition is false then doesn&#039;t the result of enable_if has a type of void?]]></description>
			<content:encoded><![CDATA[<p>&#8220;If that Condition is false, enable_if has no underling type.&#8221;</p>
<p>If the condition is false then doesn&#8217;t the result of enable_if has a type of void?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Michael Ellery		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1001</link>

		<dc:creator><![CDATA[Michael Ellery]]></dc:creator>
		<pubDate>Fri, 18 May 2018 18:18:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1001</guid>

					<description><![CDATA[great summary/intro. BTW, your first two examples with `std::is_reference` have it as a positive check instead of a negative, and then after that you switch to negating the check (which I expected all along). I wasn&#039;t sure if I was following incorrectly or probably I just missed something about the first two examples. Thanks again.]]></description>
			<content:encoded><![CDATA[<p>great summary/intro. BTW, your first two examples with `std::is_reference` have it as a positive check instead of a negative, and then after that you switch to negating the check (which I expected all along). I wasn&#8217;t sure if I was following incorrectly or probably I just missed something about the first two examples. Thanks again.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: duibudui		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-1000</link>

		<dc:creator><![CDATA[duibudui]]></dc:creator>
		<pubDate>Fri, 18 May 2018 13:05:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-1000</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-991&quot;&gt;duibudui&lt;/a&gt;.

Thanks!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-991">duibudui</a>.</p>
<p>Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-999</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Fri, 18 May 2018 11:41:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2741#comment-999</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-992&quot;&gt;duibudui&lt;/a&gt;.

Yes, that&#039;s what I meant indeed!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/15/make-sfinae-pretty-1-what-value-sfinae-brings-to-code/#comment-992">duibudui</a>.</p>
<p>Yes, that&#8217;s what I meant indeed!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
