<?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: When to Use Enums and When to Use Tag Dispatching in C++	</title>
	<atom:link href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 07 Oct 2018 13:59: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: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-1367</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sun, 07 Oct 2018 13:59:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-1367</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-1334&quot;&gt;Kilian&lt;/a&gt;.

I think this is interesting, and would love to see that idea developed into a code snippet to see how it would look like in client code interface and implementation.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-1334">Kilian</a>.</p>
<p>I think this is interesting, and would love to see that idea developed into a code snippet to see how it would look like in client code interface and implementation.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kilian		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-1334</link>

		<dc:creator><![CDATA[Kilian]]></dc:creator>
		<pubDate>Thu, 27 Sep 2018 13:46:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-1334</guid>

					<description><![CDATA[What do you think about using a variant  ?  By using a variant I ensure the type-safety, i.e. the user is only allowed to pass valid values and I have the possibility to make the resolution/dispatching at run-time. The disadvantage is probably the implementation of the function. Dispatching on a variant might be harder than on an enum or using tag-dispatching.]]></description>
			<content:encoded><![CDATA[<p>What do you think about using a variant  ?  By using a variant I ensure the type-safety, i.e. the user is only allowed to pass valid values and I have the possibility to make the resolution/dispatching at run-time. The disadvantage is probably the implementation of the function. Dispatching on a variant might be harder than on an enum or using tag-dispatching.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-959</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Thu, 03 May 2018 23:18:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-959</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-955&quot;&gt;Sean D. Cline&lt;/a&gt;.

Yes, great points, thanks for sharing!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-955">Sean D. Cline</a>.</p>
<p>Yes, great points, thanks for sharing!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-960</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Thu, 03 May 2018 23:18:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-960</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-957&quot;&gt;Johann Gerell&lt;/a&gt;.

Fixed, thanks!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-957">Johann Gerell</a>.</p>
<p>Fixed, thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sebastien Dicaire		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-958</link>

		<dc:creator><![CDATA[Sebastien Dicaire]]></dc:creator>
		<pubDate>Thu, 03 May 2018 14:35:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-958</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-953&quot;&gt;CarelC&lt;/a&gt;.

throw std::invalid_argument(&quot;Oi mate, what u doin?&quot;);]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-953">CarelC</a>.</p>
<p>throw std::invalid_argument(&#8220;Oi mate, what u doin?&#8221;);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Johann Gerell		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-957</link>

		<dc:creator><![CDATA[Johann Gerell]]></dc:creator>
		<pubDate>Thu, 03 May 2018 08:10:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-957</guid>

					<description><![CDATA[The Related Articles bullet point isn&#039;t a link...]]></description>
			<content:encoded><![CDATA[<p>The Related Articles bullet point isn&#8217;t a link&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Staffan Tjernstrom		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-956</link>

		<dc:creator><![CDATA[Staffan Tjernstrom]]></dc:creator>
		<pubDate>Wed, 02 May 2018 12:40:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-956</guid>

					<description><![CDATA[With C++17 you can have your cake and eat it, if you go for the if constexpr solution. Now you can get the cache / locality benefits of the enum solution with the compile time benefits as well, without the type universe pollution that tag dispatching introduces.]]></description>
			<content:encoded><![CDATA[<p>With C++17 you can have your cake and eat it, if you go for the if constexpr solution. Now you can get the cache / locality benefits of the enum solution with the compile time benefits as well, without the type universe pollution that tag dispatching introduces.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sean D. Cline		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-955</link>

		<dc:creator><![CDATA[Sean D. Cline]]></dc:creator>
		<pubDate>Wed, 02 May 2018 11:42:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-955</guid>

					<description><![CDATA[Articles comparing the different ways to do something are always fun. Here&#039;s another way to think about:
https://godbolt.org/g/w8pNiW
(Using an enum as a template argument to achieve a form of tag dispatching.)]]></description>
			<content:encoded><![CDATA[<p>Articles comparing the different ways to do something are always fun. Here&#8217;s another way to think about:<br />
<a href="https://godbolt.org/g/w8pNiW" rel="nofollow ugc">https://godbolt.org/g/w8pNiW</a><br />
(Using an enum as a template argument to achieve a form of tag dispatching.)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-954</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Wed, 02 May 2018 07:06:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-954</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-953&quot;&gt;CarelC&lt;/a&gt;.

Yes, good point thanks!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-953">CarelC</a>.</p>
<p>Yes, good point thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: CarelC		</title>
		<link>https://www.fluentcpp.com/2018/05/01/when-to-use-enums-and-when-to-use-tag-dispatching-in-cpp/#comment-953</link>

		<dc:creator><![CDATA[CarelC]]></dc:creator>
		<pubDate>Wed, 02 May 2018 06:48:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1797#comment-953</guid>

					<description><![CDATA[Nice article.
I think it might be worth mentioning that with the enum you need to handle out of range values and with the tag dispatch this is not needed since you can not get an invalid/undefined tag to compile. 
For example on the enum example calling writeToFile(&quot;myFile.txt&quot;, &quot;contents&quot;, static_cast(10));]]></description>
			<content:encoded><![CDATA[<p>Nice article.<br />
I think it might be worth mentioning that with the enum you need to handle out of range values and with the tag dispatch this is not needed since you can not get an invalid/undefined tag to compile.<br />
For example on the enum example calling writeToFile(&#8220;myFile.txt&#8221;, &#8220;contents&#8221;, static_cast(10));</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
