<?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[Klasse innerhalb Klasse als Template-Parameter verwenden?]]></title><description><![CDATA[<p>Ich moechte gern folgende Verschachtelung realisieren:</p>
<pre><code>template &lt;class T&gt; class C1 {
...
private:
  T   x[100];
};

class C2;
class C2::state;      &lt;- diese forward-declaration funktioniert nicht

class C2 : public C1 &lt; C2::state &gt;
{
...
private:
  class state {
    float x,y;
  };
}
</code></pre>
<p>Weis jemand, ob so etwas moeglich ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171788/klasse-innerhalb-klasse-als-template-parameter-verwenden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 16:07:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171788.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2007 12:21:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Klasse innerhalb Klasse als Template-Parameter verwenden? on Mon, 29 Jan 2007 12:21:08 GMT]]></title><description><![CDATA[<p>Ich moechte gern folgende Verschachtelung realisieren:</p>
<pre><code>template &lt;class T&gt; class C1 {
...
private:
  T   x[100];
};

class C2;
class C2::state;      &lt;- diese forward-declaration funktioniert nicht

class C2 : public C1 &lt; C2::state &gt;
{
...
private:
  class state {
    float x,y;
  };
}
</code></pre>
<p>Weis jemand, ob so etwas moeglich ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219130</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219130</guid><dc:creator><![CDATA[katana.]]></dc:creator><pubDate>Mon, 29 Jan 2007 12:21:08 GMT</pubDate></item><item><title><![CDATA[Reply to Klasse innerhalb Klasse als Template-Parameter verwenden? on Thu, 01 Feb 2007 14:35:24 GMT]]></title><description><![CDATA[<p>Wollt nur den thread noch mal nach oben holen. Waer schoen, wenn jemand eine Antwort weis.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1221163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1221163</guid><dc:creator><![CDATA[katana.]]></dc:creator><pubDate>Thu, 01 Feb 2007 14:35:24 GMT</pubDate></item><item><title><![CDATA[Reply to Klasse innerhalb Klasse als Template-Parameter verwenden? on Thu, 01 Feb 2007 15:27:16 GMT]]></title><description><![CDATA[<p>DU verwendest zur auspraegung eines Templates ne klasse C2::state die noch ned definiert ist, das funktioniert soweiso ned.<br />
Bei der ableitung muss die basisklasse natuerlich voll ausgepraegt vorliegen und compilierbar sein. kann sie aber nicht durch die abhaengigkeit im template.</p>
<p>und glaub eingebettete klassen kann man gar ned forwarden ...</p>
<p>ueberleg mal ob du wirklich die Ableitung brauchst, oder ob du nicht nen Interface nach ausen ziehen kannst ....</p>
<p>Ciao ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1221216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1221216</guid><dc:creator><![CDATA[RHBaum]]></dc:creator><pubDate>Thu, 01 Feb 2007 15:27:16 GMT</pubDate></item></channel></rss>