<?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: The Most Vexing Parse: How to Spot It and Fix It Quickly	</title>
	<atom:link href="https://www.fluentcpp.com/2018/01/30/most-vexing-parse/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 23 Jun 2019 14:20:57 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-1116</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 15 Jul 2018 21:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-1116</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-1105&quot;&gt;Panos KJ&lt;/a&gt;.

Yes absolutely, that&#039;s the more modern approach for the most vexing part. And uniform initialization is a horny topics with things to talk about indeed, thanks for the suggestion :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-1105">Panos KJ</a>.</p>
<p>Yes absolutely, that&#8217;s the more modern approach for the most vexing part. And uniform initialization is a horny topics with things to talk about indeed, thanks for the suggestion 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Panos KJ		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-1105</link>

		<dc:creator><![CDATA[Panos KJ]]></dc:creator>
		<pubDate>Fri, 13 Jul 2018 09:35:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-1105</guid>

					<description><![CDATA[My first though on how to fix this was KeyInstrument key{FutureDate(date1), OptionExpiry(date2)}; Or even KeyInstrument key{FutureDate{date1}, OptionExpiry{date2}}; You could write an article on always using uniform initialization.]]></description>
			<content:encoded><![CDATA[<p>My first though on how to fix this was KeyInstrument key{FutureDate(date1), OptionExpiry(date2)}; Or even KeyInstrument key{FutureDate{date1}, OptionExpiry{date2}}; You could write an article on always using uniform initialization.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Puneet Agrawal		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-828</link>

		<dc:creator><![CDATA[Puneet Agrawal]]></dc:creator>
		<pubDate>Fri, 16 Feb 2018 10:43:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-828</guid>

					<description><![CDATA[Nice article Jonathan. 
In addition to the above mentioned solutions, another solution one can also use in pre-C++11 systems, is to use old C-style cast or static_cast, which is more clear, as your are theoretically doing a casting here, though internally both are the same types.
e.g. 
KeyInstrument key(static_cast(date1), static_cast(date2));
or 
KeyInstrument key((FutureDate)date1, (OptionExpiry)date2);]]></description>
			<content:encoded><![CDATA[<p>Nice article Jonathan.<br />
In addition to the above mentioned solutions, another solution one can also use in pre-C++11 systems, is to use old C-style cast or static_cast, which is more clear, as your are theoretically doing a casting here, though internally both are the same types.<br />
e.g.<br />
KeyInstrument key(static_cast(date1), static_cast(date2));<br />
or<br />
KeyInstrument key((FutureDate)date1, (OptionExpiry)date2);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aymen Schehaider		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-801</link>

		<dc:creator><![CDATA[Aymen Schehaider]]></dc:creator>
		<pubDate>Wed, 07 Feb 2018 10:53:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-801</guid>

					<description><![CDATA[Aha a nice post by the way. Hopefully we are using uniform initialization @work, but it is always good to know about vexing-parse :D]]></description>
			<content:encoded><![CDATA[<p>Aha a nice post by the way. Hopefully we are using uniform initialization @work, but it is always good to know about vexing-parse 😀</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-797</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 06 Feb 2018 20:59:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-797</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-795&quot;&gt;David Forgeas&lt;/a&gt;.

Haha you&#039;re right! I&#039;ve included this remark into the post. Thanks]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-795">David Forgeas</a>.</p>
<p>Haha you&#8217;re right! I&#8217;ve included this remark into the post. Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Forgeas		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-795</link>

		<dc:creator><![CDATA[David Forgeas]]></dc:creator>
		<pubDate>Mon, 05 Feb 2018 16:21:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-795</guid>

					<description><![CDATA[A a(B());
a is a function that takes a function pointer and returns an A by value. The function pointer, which is unnamed, points to a function that takes no arguments and returns a B by value. Right?]]></description>
			<content:encoded><![CDATA[<p>A a(B());<br />
a is a function that takes a function pointer and returns an A by value. The function pointer, which is unnamed, points to a function that takes no arguments and returns a B by value. Right?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-793</link>

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

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-792&quot;&gt;Richard Rombouts&lt;/a&gt;.

You&#039;re right, I&#039;ve replaced brackets with curly braces. Thanks Richard!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-792">Richard Rombouts</a>.</p>
<p>You&#8217;re right, I&#8217;ve replaced brackets with curly braces. Thanks Richard!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Richard Rombouts		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-792</link>

		<dc:creator><![CDATA[Richard Rombouts]]></dc:creator>
		<pubDate>Fri, 02 Feb 2018 08:22:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-792</guid>

					<description><![CDATA[Great article. Except { and } are normally called (curly) braces and the round ( and ) are called (round) brackets.

... which consists in calling constructors with brackets {} instead ... // &#060;- curly braces
A function doesn’t declare its parameters with brackets, so there ... // &#060;- curly braces

A function ***does*** use (round) brackets!]]></description>
			<content:encoded><![CDATA[<p>Great article. Except { and } are normally called (curly) braces and the round ( and ) are called (round) brackets.</p>
<p>&#8230; which consists in calling constructors with brackets {} instead &#8230; // &lt;- curly braces<br />
A function doesn’t declare its parameters with brackets, so there &#8230; // &lt;- curly braces</p>
<p>A function ***does*** use (round) brackets!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Norbert Riedlin		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-791</link>

		<dc:creator><![CDATA[Norbert Riedlin]]></dc:creator>
		<pubDate>Fri, 02 Feb 2018 06:30:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-791</guid>

					<description><![CDATA[Thanks for the article. One point to note is that the line
&lt;code&gt;A a;&lt;/code&gt;
won&#039;t zero initialize a, if A is a builtin type like int. Something you have to consider when writing templates. You should definitely use
&lt;code&gt;A a {};&lt;/code&gt;
in such cases.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the article. One point to note is that the line<br />
<code>A a;</code><br />
won&#8217;t zero initialize a, if A is a builtin type like int. Something you have to consider when writing templates. You should definitely use<br />
<code>A a {};</code><br />
in such cases.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nico Bako		</title>
		<link>https://www.fluentcpp.com/2018/01/30/most-vexing-parse/#comment-790</link>

		<dc:creator><![CDATA[Nico Bako]]></dc:creator>
		<pubDate>Thu, 01 Feb 2018 21:56:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1906#comment-790</guid>

					<description><![CDATA[Wow! Thanks for the post. 

I always wondered why I would get errors when I did not omit the parentheses whenever I was instantiating an object that doesn&#039;t take any arguments in its constructor like &lt;code&gt; A a(); &lt;/code&gt;.

I just ran this code :

&lt;pre&gt;
&lt;code&gt;
class A {
public:
	A(){}
	A(int){};
};

int main() {
	A a1();
	A a2(5);
}
&lt;/code&gt;
&lt;/pre&gt;

and I was surprised that it compiled and ran. But, when I debugged it I noticed that object &lt;code&gt;a2&lt;/code&gt; existed on the stack, but object &lt;code&gt;a1&lt;/code&gt; did not... Very interesting!]]></description>
			<content:encoded><![CDATA[<p>Wow! Thanks for the post. </p>
<p>I always wondered why I would get errors when I did not omit the parentheses whenever I was instantiating an object that doesn&#8217;t take any arguments in its constructor like <code> A a(); </code>.</p>
<p>I just ran this code :</p>
<pre>
<code>
class A {
public:
	A(){}
	A(int){};
};

int main() {
	A a1();
	A a2(5);
}
</code>
</pre>
<p>and I was surprised that it compiled and ran. But, when I debugged it I noticed that object <code>a2</code> existed on the stack, but object <code>a1</code> did not&#8230; Very interesting!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
