<?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 the Benefits of Strong Typing in C++ at a Fraction of the Cost	</title>
	<atom:link href="https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Thu, 26 Apr 2018 13:59:30 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Vincent Zalzal		</title>
		<link>https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-911</link>

		<dc:creator><![CDATA[Vincent Zalzal]]></dc:creator>
		<pubDate>Sat, 07 Apr 2018 16:42:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3411#comment-911</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-910&quot;&gt;Walther Zwart&lt;/a&gt;.

Indeed, you can construct the struct without the struct name, but you need at least curly braces. In the example above:
```
make_rect(Width{1.618}, Height{1.0}); // compiles and is safe
make_rect(1.618, 1.0); // does not compile
make_rect({1.618}, {1.0}); // compiles and is unsafe
```
That last line should be forbidden by your coding standards. Having two arguments constructed with aggregate initialization is unclear, and should easily be flagged during code review. It could even be tool-enforced... probably.

If you want the explicit constructors, then you may need the move constructor also, etc, and quite fast, you will be better off with a design like NamedType, in my opinion.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-910">Walther Zwart</a>.</p>
<p>Indeed, you can construct the struct without the struct name, but you need at least curly braces. In the example above:<br />
&#8220;`<br />
make_rect(Width{1.618}, Height{1.0}); // compiles and is safe<br />
make_rect(1.618, 1.0); // does not compile<br />
make_rect({1.618}, {1.0}); // compiles and is unsafe<br />
&#8220;`<br />
That last line should be forbidden by your coding standards. Having two arguments constructed with aggregate initialization is unclear, and should easily be flagged during code review. It could even be tool-enforced&#8230; probably.</p>
<p>If you want the explicit constructors, then you may need the move constructor also, etc, and quite fast, you will be better off with a design like NamedType, in my opinion.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Walther Zwart		</title>
		<link>https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-910</link>

		<dc:creator><![CDATA[Walther Zwart]]></dc:creator>
		<pubDate>Sat, 07 Apr 2018 11:26:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3411#comment-910</guid>

					<description><![CDATA[I like this idea. I have used it as well. But removing the explicit constructor makes it much weaker. If a function takes two strongly typed arguments, you can call it with the underlying type and get the order wrong.]]></description>
			<content:encoded><![CDATA[<p>I like this idea. I have used it as well. But removing the explicit constructor makes it much weaker. If a function takes two strongly typed arguments, you can call it with the underlying type and get the order wrong.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Martin Moene		</title>
		<link>https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-909</link>

		<dc:creator><![CDATA[Martin Moene]]></dc:creator>
		<pubDate>Sat, 07 Apr 2018 07:12:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3411#comment-909</guid>

					<description><![CDATA[Argh, that would generator the operators also for strong types you don&#039;t want them for (and every other type (:]]></description>
			<content:encoded><![CDATA[<p>Argh, that would generator the operators also for strong types you don&#8217;t want them for (and every other type (:</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Martin Moene		</title>
		<link>https://www.fluentcpp.com/2018/04/06/strong-types-by-struct/#comment-908</link>

		<dc:creator><![CDATA[Martin Moene]]></dc:creator>
		<pubDate>Sat, 07 Apr 2018 07:00:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3411#comment-908</guid>

					<description><![CDATA[Why not use template inline T operator+( T lhs, T rhs ) {...} etc.?

See https://godbolt.org/g/kS6g6K]]></description>
			<content:encoded><![CDATA[<p>Why not use template inline T operator+( T lhs, T rhs ) {&#8230;} etc.?</p>
<p>See <a href="https://godbolt.org/g/kS6g6K" rel="nofollow ugc">https://godbolt.org/g/kS6g6K</a></p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
