<?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[Einzelne Template Methode in nicht Template Klasse]]></title><description><![CDATA[<p>Hallo zusammen<br />
Ich wollte mich einmal erkundigen, ob es möglich ist, eine einzelne Templatemethode in einer Nicht Template Klasse zu implementieren?</p>
<p>So etwas in dieser Art:</p>
<pre><code class="language-cpp">// ********************************** class &quot;ResourceService&quot; *********************************
// This class handles the entire resource management of this application. This ResourceService
// is capable of loading from any imaginable datasource like local files, nfs, http, ftp,
// soap, any kind databases etc. by adequate ResourceReaders. In the same manner, this
// ResourceService is capable of decoding any imaginable audio, video and image data by
// adequate ResourceDecoders, thus every imaginable datasource can be combined with any
// imaginable binary or non-binary data. Every resource can either be loaded synchronous or
// asynchronous and even be streamed if required. Furthermore this ResourceService can handle
// procedural resources which are being generated by mathematical functions at runtime.
// Last but not least this ResourceService is capable of sharing resources between multiple
// instances which need the same or part of the same resources at the same time and does
// tranparently decide when to load and unload which resource using reference counting and
// foreseeing heuristics.
// Be aware that a resource reader is a statefull object and thus cannot be shared between
// multiple resources, while the resource decoders are stateless and can easily be shared.
// While the ResourceReaderFactory is organized by a chain of responsibility, this comfortable
// approach would be far too slow for the ResourceDecoders in coherence with the streaming
// capability and is therefore organzied by a balanced binary search tree instead.
// Author: Samuel Lörtscher
// ********************************************************************************************
class ResourceService:public Service{
 private:
 // --------------------------------- private dynamic members ---------------------------------
 Dictionary&lt;string*,Resource*&gt;        *dcRsc; // a dictionary containing all resources
 List&lt;string*,ResourceReaderFactory*&gt; *lsRdr; // a list containing all reader factories
 Dictionary&lt;string*,ResourceDecoder*&gt; *dcDec; // a dictionary containing all resource decoders
 VideoService                         *svVdo; // required for accessing video memory
 AudioService                         *svAud; // required for accessing audio memory
 InputService                         *svInp; // required for accessing haptic devices
 // -------------------------------------------------------------------------------------------
public:
 // ---------------------------- custom constructor and destructor ----------------------------
 ResourceService(HInstance Instance,HWindow Window);
 ~ResourceService(void);
 // -------------------------------------------------------------------------------------------

 // ---------------------------------- public dynamic methods ---------------------------------
 void RegisterReaderFactory(ResourceReaderFactory *Factory);
 void UnregisterReaderFactory(ResourceReaderFactory *Factory);
 void RegisterDecoder(string *TypID,ResourceDecoder *Decoder);
 void UnregisterDecoder(string *TypID);
 void RegisterResource(string *ID,Resource *Resource);
 void UnregisterResource(string *ID);

 template&lt;class T&gt; T *GetResource&lt;class T&gt;(string *ID); // Diese methode möchte ich als template?
 // -------------------------------------------------------------------------------------------
};
// ############################################################################################
</code></pre>
<p>Mfg Samuel</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/262365/einzelne-template-methode-in-nicht-template-klasse</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 16:13:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/262365.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Mar 2010 19:13:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:20:56 GMT]]></title><description><![CDATA[<p>Hallo zusammen<br />
Ich wollte mich einmal erkundigen, ob es möglich ist, eine einzelne Templatemethode in einer Nicht Template Klasse zu implementieren?</p>
<p>So etwas in dieser Art:</p>
<pre><code class="language-cpp">// ********************************** class &quot;ResourceService&quot; *********************************
// This class handles the entire resource management of this application. This ResourceService
// is capable of loading from any imaginable datasource like local files, nfs, http, ftp,
// soap, any kind databases etc. by adequate ResourceReaders. In the same manner, this
// ResourceService is capable of decoding any imaginable audio, video and image data by
// adequate ResourceDecoders, thus every imaginable datasource can be combined with any
// imaginable binary or non-binary data. Every resource can either be loaded synchronous or
// asynchronous and even be streamed if required. Furthermore this ResourceService can handle
// procedural resources which are being generated by mathematical functions at runtime.
// Last but not least this ResourceService is capable of sharing resources between multiple
// instances which need the same or part of the same resources at the same time and does
// tranparently decide when to load and unload which resource using reference counting and
// foreseeing heuristics.
// Be aware that a resource reader is a statefull object and thus cannot be shared between
// multiple resources, while the resource decoders are stateless and can easily be shared.
// While the ResourceReaderFactory is organized by a chain of responsibility, this comfortable
// approach would be far too slow for the ResourceDecoders in coherence with the streaming
// capability and is therefore organzied by a balanced binary search tree instead.
// Author: Samuel Lörtscher
// ********************************************************************************************
class ResourceService:public Service{
 private:
 // --------------------------------- private dynamic members ---------------------------------
 Dictionary&lt;string*,Resource*&gt;        *dcRsc; // a dictionary containing all resources
 List&lt;string*,ResourceReaderFactory*&gt; *lsRdr; // a list containing all reader factories
 Dictionary&lt;string*,ResourceDecoder*&gt; *dcDec; // a dictionary containing all resource decoders
 VideoService                         *svVdo; // required for accessing video memory
 AudioService                         *svAud; // required for accessing audio memory
 InputService                         *svInp; // required for accessing haptic devices
 // -------------------------------------------------------------------------------------------
public:
 // ---------------------------- custom constructor and destructor ----------------------------
 ResourceService(HInstance Instance,HWindow Window);
 ~ResourceService(void);
 // -------------------------------------------------------------------------------------------

 // ---------------------------------- public dynamic methods ---------------------------------
 void RegisterReaderFactory(ResourceReaderFactory *Factory);
 void UnregisterReaderFactory(ResourceReaderFactory *Factory);
 void RegisterDecoder(string *TypID,ResourceDecoder *Decoder);
 void UnregisterDecoder(string *TypID);
 void RegisterResource(string *ID,Resource *Resource);
 void UnregisterResource(string *ID);

 template&lt;class T&gt; T *GetResource&lt;class T&gt;(string *ID); // Diese methode möchte ich als template?
 // -------------------------------------------------------------------------------------------
};
// ############################################################################################
</code></pre>
<p>Mfg Samuel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864460</guid><dc:creator><![CDATA[Ishildur]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:20:56 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:22:11 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">template&lt;class T&gt; T *GetResource(string *ID);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1864465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864465</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:22:11 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:37:25 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/18422">@drakon</a><br />
Hehe, ja das dachte ich zuerst auch, aber das kompiliert eben auch nicht. Hab jetzt so ziemlich jede Variation durchprobiert...</p>
<p>Ich benutze Visual Studio 2008 Professional</p>
<p>P.S.<br />
An die C++ Templates werde ich mich wohl nie gewöhnen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864476</guid><dc:creator><![CDATA[Ishildur]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:37:25 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:38:47 GMT]]></title><description><![CDATA[<p>Ishildur schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/18422">@drakon</a><br />
Hehe, ja das dachte ich zuerst auch, aber das kompiliert eben auch nicht.</p>
</blockquote>
<p>Dann ist was anderes falsch. Ich frag jetzt mal nicht nach der Fehlermeldung *Zaunpfähle werf*... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864478</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864478</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:38:47 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:41:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9960">@pumuckl</a><br />
Jaaa die Fehlermeldungen von Visual Studio bei C++ Templatefehlern...<br />
Glaube mir, du willst nicht, dass ich die hier poste, sind ca. 800 Zeilen Fehlermeldungen. Nehme ich diese Zeile raus, kompilierts und linkts. Aber ich bin schonmal sehr froh, dass ich nun sicher sein kann, dass es nicht an der Templatemethodendeklaration liegt, dies schränkt die Fehlersuche bereits wesentlich ein <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864479</guid><dc:creator><![CDATA[Ishildur]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:41:24 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 19:50:00 GMT]]></title><description><![CDATA[<p>Ishildur schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9960">@pumuckl</a><br />
Jaaa die Fehlermeldungen von Visual Studio bei C++ Templatefehlern...<br />
Glaube mir, du willst nicht, dass ich die hier poste, sind ca. 800 Zeilen Fehlermeldungen. Nehme ich diese Zeile raus, kompilierts und linkts. Aber ich bin schonmal sehr froh, dass ich nun sicher sein kann, dass es nicht an der Templatemethodendeklaration liegt, dies schränkt die Fehlersuche bereits wesentlich ein <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>Die ersten 20-40 Zeilen wären schonmal was. wenn du ne leere Methode draus machst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864485</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 04 Mar 2010 19:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 20:08:53 GMT]]></title><description><![CDATA[<p>drakon schrieb:</p>
<blockquote>
<pre><code class="language-cpp">template&lt;class T&gt; T *GetResource(string *ID);
</code></pre>
</blockquote>
<p>seit wann kann man in C++ fkt nur an hand des rückgabetypen überladen?</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864493</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Thu, 04 Mar 2010 20:08:53 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 20:17:17 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<p>drakon schrieb:</p>
<blockquote>
<pre><code class="language-cpp">template&lt;class T&gt; T *GetResource(string *ID);
</code></pre>
</blockquote>
<p>seit wann kann man in C++ fkt nur an hand des rückgabetypen überladen?</p>
<p>bb</p>
</blockquote>
<p>Wer sagt denn hier etwas von überladen?! (Bitte sag nicht der riesen Kommentar dort oben im Code, denn den habe ich nicht gelesen. ;))</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1250">@Ishildur</a>:<br />
Das hier funktioniert wunderbar:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
struct foo
{
 template&lt;class T&gt; void bar ()
 {
   std::cout &lt;&lt; &quot;foo::bar&quot;; 
 }
};

int main() 
{
 foo f;
 f.bar&lt;int&gt; ();
}
</code></pre>
<p>Der Fehler liegt wo anderst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864500</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 04 Mar 2010 20:17:17 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 20:26:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/16305">@unskilled</a><br />
Ja anhand des Templateparamters sollte der Compiler das eben doch wieder unterscheinen können. Ich möchte auf die Resourcen dann eifach folgendermassen zugreifen können:</p>
<pre><code class="language-cpp">Sound   *snd = svRsc-&gt;GetResource&lt;Sound*&gt;(&quot;Smash2&quot;);
 Texture *tex = svRsc-&gt;GetResource&lt;Texture*&gt;(&quot;Gunship&quot;);
</code></pre>
<p>Anstatt:</p>
<pre><code class="language-cpp">Sound   *snd = dynamic_cast&lt;Sound*&gt;(svRsc-&gt;GetResource(&quot;Smash2&quot;));
 Texture *tex = dynamic_cast&lt;Texture*&gt;(svRsc-&gt;GetResource(&quot;Gunship&quot;));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1864502</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864502</guid><dc:creator><![CDATA[Ishildur]]></dc:creator><pubDate>Thu, 04 Mar 2010 20:26:15 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 20:34:47 GMT]]></title><description><![CDATA[<p>drakon schrieb:</p>
<blockquote>
<p>unskilled schrieb:</p>
<blockquote>
<p>drakon schrieb:</p>
<blockquote>
<pre><code class="language-cpp">template&lt;class T&gt; T *GetResource(string *ID);
</code></pre>
</blockquote>
<p>seit wann kann man in C++ fkt nur an hand des rückgabetypen überladen?</p>
<p>bb</p>
</blockquote>
<p>Wer sagt denn hier etwas von überladen?! (Bitte sag nicht der riesen Kommentar dort oben im Code, denn den habe ich nicht gelesen. ;))</p>
</blockquote>
<p>oh - war einfach nur nen unüberlegter post - hab da was durcheinander gebracht gehabt^^<br />
(ich auch nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> )</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/6765">@I</a>.:<br />
wo liegt denn nun dein problem?<br />
du kannst die templates so gar spezialisieren:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

struct foo
{
	template&lt;class T&gt; T bar ()
	{
		std::cout &lt;&lt; &quot;foo::bar&lt;T&gt;&quot;;
		return T();
	}

	template&lt;&gt;
	int bar()
	{
		std::cout &lt;&lt; &quot;foo::bar&lt;int&gt;&quot;;
		return int();
	}

	template&lt;&gt;
	float bar()
	{
		std::cout &lt;&lt; &quot;foo::bar&lt;float&quot;;
		return float();
	}
};

int main()
{
	foo f;
	int x = f.bar&lt;int&gt; ();
	float y = f.bar&lt;float&gt; ();
}
</code></pre>
<p>um mal drakons bsp. zu erweitern...</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864507</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Thu, 04 Mar 2010 20:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 20:36:50 GMT]]></title><description><![CDATA[<p>Das Rätsel hat sich aufgeklärt:<br />
Build -&gt; Clean Solution<br />
Build -&gt; Rebuild Solution</p>
<p>Die Welt könnte so schön sein... :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864508</guid><dc:creator><![CDATA[Ishildur]]></dc:creator><pubDate>Thu, 04 Mar 2010 20:36:50 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Thu, 04 Mar 2010 22:31:34 GMT]]></title><description><![CDATA[<p>unskilled schrieb:</p>
<blockquote>
<p>du kannst die templates so gar spezialisieren:</p>
</blockquote>
<p>Hmm.. Wie <a href="http://de.wikipedia.org/wiki/Garstufen#Garzeit" rel="nofollow">gar</a> sind denn die templates? :p</p>
<p>Musste echt 2x lesen, bis ich wusste, was du da meinst. Dachte zuerst, dass du &quot;so gar nicht&quot; schreiben wolltest. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1250">@Ishildur</a><br />
Ja.. Das hilft bei mehr Problemen, als man wagen zu denken möchte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>//Edit:<br />
Um das mit dem Rebuild noch zu unterstreichen:<br />
<a href="http://www.drakon.ch/?id=&amp;offset=5&amp;mobile=0&amp;show_entry=68" rel="nofollow">http://www.drakon.ch/?id=&amp;offset=5&amp;mobile=0&amp;show_entry=68</a><br />
Du bist also mit solchen Phänomenen nicht alleine. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864517</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 04 Mar 2010 22:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Fri, 05 Mar 2010 12:16:28 GMT]]></title><description><![CDATA[<p>So weit ich weiss kann man Methoden nicht spezialisieren.</p>
<p>Edit: Gemeint sind natürlich templated member</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864617</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864617</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Fri, 05 Mar 2010 12:16:28 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Fri, 05 Mar 2010 10:52:16 GMT]]></title><description><![CDATA[<p>DocShoe schrieb:</p>
<blockquote>
<p>So weit ich weiss kann man Methoden nicht spezialisieren.</p>
</blockquote>
<p>Aber überladen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864674</guid><dc:creator><![CDATA[evilissimo]]></dc:creator><pubDate>Fri, 05 Mar 2010 10:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Fri, 05 Mar 2010 11:25:49 GMT]]></title><description><![CDATA[<p>drakon schrieb:</p>
<blockquote>
<p>Um das mit dem Rebuild noch zu unterstreichen:<br />
<a href="http://www.drakon.ch/?id=&amp;offset=5&amp;mobile=0&amp;show_entry=68" rel="nofollow">http://www.drakon.ch/?id=&amp;offset=5&amp;mobile=0&amp;show_entry=68</a><br />
Du bist also mit solchen Phänomenen nicht alleine. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Mein Kommentar zu dem Blogpost:</p>
<blockquote>
<p>VC scheint nicht immer mitzukriegen, wenn sich Header ändern, vor allem wenn diese nur indirekt eingebunden werden, sich in anderen Projekten befinden, für die in der Solution keine Abhängigkeiten angegeben sind usw.<br />
Das Ergebnis sind in diesem Fall Objektdateien und libs mit verschiedenen Größeninformationen für die selbe Klasse, und das geht dann irgendwo schief, weil der Teil mit der größeren Foo ein foo bearbeitet, für das der Teil mit dem kleineren Foo Speicher bereitgestellt hat (auf dem Stack oder Heap ist dabei egal) und über diesen reservierten Speicher rausschreibt.</p>
</blockquote>
<p>Da hier immer noch nicht die Fehlermeldungen gepostet wurden kann man auch nicht genau sagen obs was in der Richtugn gewesen ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864686</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864686</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 05 Mar 2010 11:25:49 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Fri, 05 Mar 2010 12:30:09 GMT]]></title><description><![CDATA[<p>Ishildur schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9960">@pumuckl</a><br />
Jaaa die Fehlermeldungen von Visual Studio bei C++ Templatefehlern...<br />
Glaube mir, du willst nicht, dass ich die hier poste, sind ca. 800 Zeilen Fehlermeldungen.</p>
</blockquote>
<p>Dazu fällt mir folgendes ein:</p>
<p>Dravere schrieb:</p>
<blockquote>
<p>1. Wieso gebt ihr uns nie die Fehlermeldungen? Für uns sind die nicht kryptisch, wir können die lesen und sie helfen uns.</p>
</blockquote>
<p>Im Ernst: Template-Fehlermeldungen sind weit übersichtlicher als ihr Ruf, mit etwas Übung kann man die wichtigen Details schnell herauslesen. Natürlich musst du auch nicht die 790 Zeilen Folgefehler anschauen. Und ein Klick auf die Fehlermeldung hilft auch schon in vielen Fällen.</p>
<p>Das Posten der Fehlermeldung hat den netten Nebeneffekt, dass sich keine Diskussion über die Art der Fragestellung bildet. Einfach ein Rat für zukünftige Probleme... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864708</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Fri, 05 Mar 2010 12:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Einzelne Template Methode in nicht Template Klasse on Fri, 05 Mar 2010 17:54:30 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>Da hier immer noch nicht die Fehlermeldungen gepostet wurden kann man auch nicht genau sagen obs was in der Richtugn gewesen ist...</p>
</blockquote>
<p>Das stimmt allerdings.</p>
<p>btw:<br />
Du hast am falschen Ort gepostet. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> - Ich habe den Kommentar an den richtigen Ort verschoben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1864863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1864863</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Fri, 05 Mar 2010 17:54:30 GMT</pubDate></item></channel></rss>