<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[typelist_cat]]></title><description><![CDATA[<p>Hallo Forum,<br />
ich habe folgendes Problem:<br />
Ich möchte eine variable Anzahl an Typlisten miteinander verketten ( also im Grunde wie std::tuple_cat ). Die Definition der Typliste sieht folgendermaßen aus.</p>
<pre><code>template &lt;typename... _Types&gt;
	struct typelist {};
</code></pre>
<p>Wenn ich zwei Listen verketten möchte, ist das alles kein Problem.</p>
<pre><code>template &lt;typename _Typelist1, typename _Typelist2&gt;
	struct typelist_cat;

	template &lt;template &lt;typename...&gt; typename _Typelist1, template &lt;typename...&gt; typename _Typelist2, typename... _Types1, typename... _Types2&gt;
	struct typelist_cat&lt;_Typelist1&lt;_Types1...&gt;, _Typelist2&lt;_Types2...&gt;&gt;
	{
		using type = typelist&lt;_Types1..., _Types2...&gt;;
	};
</code></pre>
<p>Gibt es irgendeine Möglichkeit das ganze jetzt mit einer variablen Argumentliste zu implementieren ?</p>
<pre><code>template &lt;typename... _Typelists&gt;
	struct typelist_cat;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/339909/typelist_cat</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 16:55:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/339909.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Oct 2016 12:34:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to typelist_cat on Fri, 07 Oct 2016 12:34:37 GMT]]></title><description><![CDATA[<p>Hallo Forum,<br />
ich habe folgendes Problem:<br />
Ich möchte eine variable Anzahl an Typlisten miteinander verketten ( also im Grunde wie std::tuple_cat ). Die Definition der Typliste sieht folgendermaßen aus.</p>
<pre><code>template &lt;typename... _Types&gt;
	struct typelist {};
</code></pre>
<p>Wenn ich zwei Listen verketten möchte, ist das alles kein Problem.</p>
<pre><code>template &lt;typename _Typelist1, typename _Typelist2&gt;
	struct typelist_cat;

	template &lt;template &lt;typename...&gt; typename _Typelist1, template &lt;typename...&gt; typename _Typelist2, typename... _Types1, typename... _Types2&gt;
	struct typelist_cat&lt;_Typelist1&lt;_Types1...&gt;, _Typelist2&lt;_Types2...&gt;&gt;
	{
		using type = typelist&lt;_Types1..., _Types2...&gt;;
	};
</code></pre>
<p>Gibt es irgendeine Möglichkeit das ganze jetzt mit einer variablen Argumentliste zu implementieren ?</p>
<pre><code>template &lt;typename... _Typelists&gt;
	struct typelist_cat;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2510861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510861</guid><dc:creator><![CDATA[Yamahari]]></dc:creator><pubDate>Fri, 07 Oct 2016 12:34:37 GMT</pubDate></item><item><title><![CDATA[Reply to typelist_cat on Fri, 07 Oct 2016 14:12:55 GMT]]></title><description><![CDATA[<p>Bezeichner, die mit _ gefolgt von einem Großbuchstabe beginnen, sind reservert.</p>
<pre><code class="language-cpp">template &lt;typename... T&gt;
    struct typelist_cat;

    template &lt;&gt;
    struct typelist_cat&lt;&gt;
    {
        using type = typelist&lt;&gt;;
    };

    template &lt;typename... T&gt;
    struct typelist_cat&lt;typelist&lt;T...&gt;&gt;
    {
        using type = typelist&lt;T...&gt;;
    };

    template &lt;typename... T, typename... U, typename... V&gt;
    struct typelist_cat&lt;typelist&lt;T...&gt;, typelist2&lt;U...&gt;, V...&gt; : tuplecat&lt;typelist&lt;T..., U...&gt;, V...&gt;
    {};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2510869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510869</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Fri, 07 Oct 2016 14:12:55 GMT</pubDate></item><item><title><![CDATA[Reply to typelist_cat on Fri, 07 Oct 2016 14:10:42 GMT]]></title><description><![CDATA[<p>Ja. Einfach rekursiv behandeln:</p>
<pre><code>template &lt;typename... lists&gt; struct concat : typelist&lt;&gt; {};
template &lt;typename l&gt; struct concat&lt;l&gt; : l {};
template &lt;typename... k, typename... l, typename... lists&gt;
struct concat&lt;typelist&lt;k...&gt;, typelist&lt;l...&gt;, lists...&gt; : concat&lt;typelist&lt;k..., l...&gt;, lists...&gt; {};
</code></pre>
<p>(ungetestet). Ist funktionale Programmierung nicht klasse?</p>
<p>Edit: Ein wenig spät.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510870</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Fri, 07 Oct 2016 14:10:42 GMT</pubDate></item><item><title><![CDATA[Reply to typelist_cat on Fri, 07 Oct 2016 15:13:36 GMT]]></title><description><![CDATA[<p>Manchmal kann die Antwort doch so einfach sein! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510878</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510878</guid><dc:creator><![CDATA[Yamahari]]></dc:creator><pubDate>Fri, 07 Oct 2016 15:13:36 GMT</pubDate></item></channel></rss>