<?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[Externe Funktionsdefinition bei Templateklassen]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe:</p>
<pre><code class="language-cpp">template&lt;class T&gt; class bar
{
  public:
    char foo(int a);
};
char bar::foo(int a)
{
  return 'a';
};
</code></pre>
<p>Nun habe ich die Exception E2102: Template 'bar&lt;T&gt;' kann ohne Spezifizierungsparameter nicht verwendet werden<br />
Wie kann ich eine Klasseninterne Funktion definieren bei welcher die Template-Argumente egal sind/vernachlässigbar sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/279449/externe-funktionsdefinition-bei-templateklassen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 15:17:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/279449.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Dec 2010 09:39:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Externe Funktionsdefinition bei Templateklassen on Mon, 27 Dec 2010 09:39:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe:</p>
<pre><code class="language-cpp">template&lt;class T&gt; class bar
{
  public:
    char foo(int a);
};
char bar::foo(int a)
{
  return 'a';
};
</code></pre>
<p>Nun habe ich die Exception E2102: Template 'bar&lt;T&gt;' kann ohne Spezifizierungsparameter nicht verwendet werden<br />
Wie kann ich eine Klasseninterne Funktion definieren bei welcher die Template-Argumente egal sind/vernachlässigbar sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1999199</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1999199</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Mon, 27 Dec 2010 09:39:11 GMT</pubDate></item><item><title><![CDATA[Reply to Externe Funktionsdefinition bei Templateklassen on Mon, 27 Dec 2010 10:49:20 GMT]]></title><description><![CDATA[<p>EOutOfResources schrieb:</p>
<blockquote>
<p>Wie kann ich eine Klasseninterne Funktion definieren bei welcher die Template-Argumente egal sind/vernachlässigbar sind?</p>
</blockquote>
<p>Indem du sie einfach nicht benutzt. Das template... musst du aber trotzdem davorschreiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1999222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1999222</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 27 Dec 2010 10:49:20 GMT</pubDate></item><item><title><![CDATA[Reply to Externe Funktionsdefinition bei Templateklassen on Mon, 27 Dec 2010 11:10:10 GMT]]></title><description><![CDATA[<p>Beim Beispiel klappts Super aber beim echten Projekt habe ich drei Fehler:<br />
E2188(Ausdruckssyntax)<br />
E2401(Ungültige Template-Argumentenliste)<br />
E2040(Deklaration nicht ordnungsgemäß abgeschlossen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1999232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1999232</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Mon, 27 Dec 2010 11:10:10 GMT</pubDate></item><item><title><![CDATA[Reply to Externe Funktionsdefinition bei Templateklassen on Mon, 27 Dec 2010 12:23:32 GMT]]></title><description><![CDATA[<p>EOutOfResources schrieb:</p>
<blockquote>
<p>Beim Beispiel klappts Super aber beim echten Projekt habe ich drei Fehler:<br />
E2188(Ausdruckssyntax)<br />
E2401(Ungültige Template-Argumentenliste)<br />
E2040(Deklaration nicht ordnungsgemäß abgeschlossen)</p>
</blockquote>
<p>Tja. Da wirst du wohl irgendeinen Syntaxfehler haben. Das Grundprinzip funktioniert jedenfalls, egal ob bei Beispielprogrammen oder großen Projekten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1999258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1999258</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 27 Dec 2010 12:23:32 GMT</pubDate></item><item><title><![CDATA[Reply to Externe Funktionsdefinition bei Templateklassen on Mon, 27 Dec 2010 15:01:30 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">template &lt;typename T&gt;char bar&lt;T&gt;::foo (int a) {
	return 'a';
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1999312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1999312</guid><dc:creator><![CDATA[inter2k3]]></dc:creator><pubDate>Mon, 27 Dec 2010 15:01:30 GMT</pubDate></item></channel></rss>