<?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 Reduce the Code Bloat of a Variadic CRTP	</title>
	<atom:link href="https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Thu, 05 Jul 2018 13:04: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: Björn Fahller		</title>
		<link>https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1092</link>

		<dc:creator><![CDATA[Björn Fahller]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 13:04:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3864#comment-1092</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1091&quot;&gt;Jonathan Boccara&lt;/a&gt;.

Yes, which comes out quite nicely in situations like ImplicitlyConvertibleTo, in your NamedType library, written as:

template &#060;typename T&#062;
struct ImplicitlyConvertibleTo {
  template &#060;typename C&#062;
  struct skill {
    // code for implicit conversion of C to T
  };
};

using MyType = NamedType&#060;int, struct MyTypeTag, ImplicitlyConvertibleTo&#060;double&#062;&#062;;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1091">Jonathan Boccara</a>.</p>
<p>Yes, which comes out quite nicely in situations like ImplicitlyConvertibleTo, in your NamedType library, written as:</p>
<p>template &lt;typename T&gt;<br />
struct ImplicitlyConvertibleTo {<br />
  template &lt;typename C&gt;<br />
  struct skill {<br />
    // code for implicit conversion of C to T<br />
  };<br />
};</p>
<p>using MyType = NamedType&lt;int, struct MyTypeTag, ImplicitlyConvertibleTo&lt;double&gt;&gt;;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1091</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 11:45:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3864#comment-1091</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1090&quot;&gt;Björn Fahller&lt;/a&gt;.

Ok then if I understand well all skills (simple or composite) are implemented as nested classes? Thanks for sharing!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1090">Björn Fahller</a>.</p>
<p>Ok then if I understand well all skills (simple or composite) are implemented as nested classes? Thanks for sharing!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Björn Fahller		</title>
		<link>https://www.fluentcpp.com/2018/07/03/how-to-reduce-the-code-bloat-of-a-variadic-crtp/#comment-1090</link>

		<dc:creator><![CDATA[Björn Fahller]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 07:55:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=3864#comment-1090</guid>

					<description><![CDATA[Your ::templ can be handled by, you guessed it, adding another level of indirection.

The technique I used in my experimental strong_type lib is (changed names to match your blog post, and maybe introduced some errors) as follows:

template &#060;typename S, typename T&#062;
using skill = typename S::template skill&#060;T&#062;;

template &#060;typename ... S&#062;
class C : public skill&#060;S, C&#060;S...&#062;&#062;...
{
...
};

A skill is then implemented in its sub template type named skill.

struct Feature1 {
  template &#060;typename T&#062;
  struct skill {
    static_cast&#060;T*&#062;(this)-&#062;foo();
  };
};]]></description>
			<content:encoded><![CDATA[<p>Your ::templ can be handled by, you guessed it, adding another level of indirection.</p>
<p>The technique I used in my experimental strong_type lib is (changed names to match your blog post, and maybe introduced some errors) as follows:</p>
<p>template &lt;typename S, typename T&gt;<br />
using skill = typename S::template skill&lt;T&gt;;</p>
<p>template &lt;typename &#8230; S&gt;<br />
class C : public skill&lt;S, C&lt;S&#8230;&gt;&gt;&#8230;<br />
{<br />
&#8230;<br />
};</p>
<p>A skill is then implemented in its sub template type named skill.</p>
<p>struct Feature1 {<br />
  template &lt;typename T&gt;<br />
  struct skill {<br />
    static_cast&lt;T*&gt;(this)-&gt;foo();<br />
  };<br />
};</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
