<?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: Getting Along With The Comma Operator in C++	</title>
	<atom:link href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 19 Aug 2018 10:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: MPM		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1233</link>

		<dc:creator><![CDATA[MPM]]></dc:creator>
		<pubDate>Sun, 19 Aug 2018 10:42:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1233</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1222&quot;&gt;Uri Goren&lt;/a&gt;.

Good point!  That might have been what the engineer did.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1222">Uri Goren</a>.</p>
<p>Good point!  That might have been what the engineer did.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Uri Goren		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1222</link>

		<dc:creator><![CDATA[Uri Goren]]></dc:creator>
		<pubDate>Wed, 15 Aug 2018 13:06:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1222</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1195&quot;&gt;MPM&lt;/a&gt;.

Maybe the infinite loop was found and &quot;fixed&quot;:
while (x &#062; (999,999));]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1195">MPM</a>.</p>
<p>Maybe the infinite loop was found and &#8220;fixed&#8221;:<br />
while (x &gt; (999,999));</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1205</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 05 Aug 2018 09:11:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1205</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1188&quot;&gt;MPM&lt;/a&gt;.

Awesome story, thanks for sharing :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1188">MPM</a>.</p>
<p>Awesome story, thanks for sharing 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: pepper_chico		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1198</link>

		<dc:creator><![CDATA[pepper_chico]]></dc:creator>
		<pubDate>Wed, 01 Aug 2018 00:35:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1198</guid>

					<description><![CDATA[I have some special usages in my blog http://nosubstance.me/post/cpp-unnamed-programming-addendum/]]></description>
			<content:encoded><![CDATA[<p>I have some special usages in my blog <a href="http://nosubstance.me/post/cpp-unnamed-programming-addendum/" rel="nofollow ugc">http://nosubstance.me/post/cpp-unnamed-programming-addendum/</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Martin Moene		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1197</link>

		<dc:creator><![CDATA[Martin Moene]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 19:54:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1197</guid>

					<description><![CDATA[Colllect bits for a register mask in embedded programming, like:

// register adcsra:
set( prescale::factor::x128 )
, set( enable::adc::on )
, set( enable::interrupt::on )
, set( enable::auto_trigger::on )
, conversion::start()
;

See Combine lazy writes via comma operator:

https://github.com/martinmoene/kalman-estimator/blob/01fae7efaaf317e1a00b776608805c929313246e/include/mcu/register.hpp#L346]]></description>
			<content:encoded><![CDATA[<p>Colllect bits for a register mask in embedded programming, like:</p>
<p>// register adcsra:<br />
set( prescale::factor::x128 )<br />
, set( enable::adc::on )<br />
, set( enable::interrupt::on )<br />
, set( enable::auto_trigger::on )<br />
, conversion::start()<br />
;</p>
<p>See Combine lazy writes via comma operator:</p>
<p><a href="https://github.com/martinmoene/kalman-estimator/blob/01fae7efaaf317e1a00b776608805c929313246e/include/mcu/register.hpp#L346" rel="nofollow ugc">https://github.com/martinmoene/kalman-estimator/blob/01fae7efaaf317e1a00b776608805c929313246e/include/mcu/register.hpp#L346</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Piotr Obst		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1196</link>

		<dc:creator><![CDATA[Piotr Obst]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 19:21:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1196</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1195&quot;&gt;MPM&lt;/a&gt;.

Yes I got that, it is funny actually. But just wanted to point that out so that someone doesn&#039;t get confused.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1195">MPM</a>.</p>
<p>Yes I got that, it is funny actually. But just wanted to point that out so that someone doesn&#8217;t get confused.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: MPM		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1195</link>

		<dc:creator><![CDATA[MPM]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 19:18:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1195</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1194&quot;&gt;Piotr Obst&lt;/a&gt;.

Ah yes, that&#039;s correct, because of operator precedence.  I couldn&#039;t remember the exact code or the exact behavior, but the point I was trying to make is that the engineer was writing integer literals with commas, and it compiled fine but did something completely unexpected.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1194">Piotr Obst</a>.</p>
<p>Ah yes, that&#8217;s correct, because of operator precedence.  I couldn&#8217;t remember the exact code or the exact behavior, but the point I was trying to make is that the engineer was writing integer literals with commas, and it compiled fine but did something completely unexpected.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Piotr Obst		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1194</link>

		<dc:creator><![CDATA[Piotr Obst]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 19:09:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1194</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1188&quot;&gt;MPM&lt;/a&gt;.

Nah, it is equivalent of while(999) which is while(1) so it is infinite loop.

---

I also think that this is a very good article.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1188">MPM</a>.</p>
<p>Nah, it is equivalent of while(999) which is while(1) so it is infinite loop.</p>
<p>&#8212;</p>
<p>I also think that this is a very good article.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lưu Vĩnh Phúc		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1191</link>

		<dc:creator><![CDATA[Lưu Vĩnh Phúc]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 11:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1191</guid>

					<description><![CDATA[Boost has overloaded the comma operator for good long before C++17

vector v; 
v += 1,2,3,4,5,6,7,8,9;

There are some other practical examples here https://stackoverflow.com/q/5602112/995714]]></description>
			<content:encoded><![CDATA[<p>Boost has overloaded the comma operator for good long before C++17</p>
<p>vector v;<br />
v += 1,2,3,4,5,6,7,8,9;</p>
<p>There are some other practical examples here <a href="https://stackoverflow.com/q/5602112/995714" rel="nofollow ugc">https://stackoverflow.com/q/5602112/995714</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jft		</title>
		<link>https://www.fluentcpp.com/2018/07/31/how-to-get-along-with-the-comma-operator/#comment-1190</link>

		<dc:creator><![CDATA[jft]]></dc:creator>
		<pubDate>Tue, 31 Jul 2018 09:54:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1487#comment-1190</guid>

					<description><![CDATA[Oh the fun that can be had with , ! This is one of my favourites

int a = 1;
int b = 1;
bool c = true;

c ? ++a, ++b : --a, --b;
 
cout &#060;&#060; a &#060;&#060; &#034; &#034; &#060;&#060; b &#060;&#060; endl;

if anyone says that the output is 2 2 step away from the keyboard now! Look further down for the answer

 

 

 

 

 

 

 

 

 c ? ++a, ++b : --a, --b;

is actually parsed as

(c ? ++a, ++b : --a), --b;
because , has the lowest operator precedence and the , following --a therefore terminates the ternary !]]></description>
			<content:encoded><![CDATA[<p>Oh the fun that can be had with , ! This is one of my favourites</p>
<p>int a = 1;<br />
int b = 1;<br />
bool c = true;</p>
<p>c ? ++a, ++b : &#8211;a, &#8211;b;</p>
<p>cout &lt;&lt; a &lt;&lt; &quot; &quot; &lt;&lt; b &lt;&lt; endl;</p>
<p>if anyone says that the output is 2 2 step away from the keyboard now! Look further down for the answer</p>
<p> c ? ++a, ++b : &#8211;a, &#8211;b;</p>
<p>is actually parsed as</p>
<p>(c ? ++a, ++b : &#8211;a), &#8211;b;<br />
because , has the lowest operator precedence and the , following &#8211;a therefore terminates the ternary !</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
