<?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[Typ einer Instanz eines Templates ermitteln ?]]></title><description><![CDATA[<p>Kann ich irgendwie den Typ meiner Instanz heraus finden ?<br />
In Objective -C hat jedes Object eine isa Member welche von NSObject geerbt wurde.<br />
Gibt es so etwas auch in C++ ?</p>
<pre><code class="language-cpp">template &lt;class T&gt;
TTemplate&lt;T&gt;::TTemplate(int x):param(x)
{
 std::cout &lt;&lt; &quot; TTemplate of Typ &quot; &lt;&lt; ??? &lt;&lt; &quot; instantiated &quot; &lt;&lt; std::endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/286916/typ-einer-instanz-eines-templates-ermitteln</link><generator>RSS for Node</generator><lastBuildDate>Thu, 20 Aug 2026 16:29:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/286916.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 May 2011 17:02:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Typ einer Instanz eines Templates ermitteln ? on Wed, 18 May 2011 17:02:37 GMT]]></title><description><![CDATA[<p>Kann ich irgendwie den Typ meiner Instanz heraus finden ?<br />
In Objective -C hat jedes Object eine isa Member welche von NSObject geerbt wurde.<br />
Gibt es so etwas auch in C++ ?</p>
<pre><code class="language-cpp">template &lt;class T&gt;
TTemplate&lt;T&gt;::TTemplate(int x):param(x)
{
 std::cout &lt;&lt; &quot; TTemplate of Typ &quot; &lt;&lt; ??? &lt;&lt; &quot; instantiated &quot; &lt;&lt; std::endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2065353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2065353</guid><dc:creator><![CDATA[Bacid90210]]></dc:creator><pubDate>Wed, 18 May 2011 17:02:37 GMT</pubDate></item><item><title><![CDATA[Reply to Typ einer Instanz eines Templates ermitteln ? on Wed, 18 May 2011 17:04:50 GMT]]></title><description><![CDATA[<p>Bacid90210 schrieb:</p>
<blockquote>
<p>Kann ich irgendwie den Typ meiner Instanz heraus finden ?</p>
</blockquote>
<pre><code class="language-cpp">TTemplate&lt;T&gt;
</code></pre>
<p>Oder willst du nur</p>
<pre><code class="language-cpp">T
</code></pre>
<p>Für Laufzeit-Typinformationen (RTTI) gibts den <code>typeid</code> -Operator.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2065357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2065357</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 18 May 2011 17:04:50 GMT</pubDate></item><item><title><![CDATA[Reply to Typ einer Instanz eines Templates ermitteln ? on Wed, 18 May 2011 17:16:16 GMT]]></title><description><![CDATA[<p>ich möchte nur T heraus finden ..<br />
hast du bitt mal ein Beispiel-Code-Snippet ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2065364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2065364</guid><dc:creator><![CDATA[Bacid90210]]></dc:creator><pubDate>Wed, 18 May 2011 17:16:16 GMT</pubDate></item><item><title><![CDATA[Reply to Typ einer Instanz eines Templates ermitteln ? on Wed, 18 May 2011 17:18:10 GMT]]></title><description><![CDATA[<p>Du hast ja <code>T</code> schon, wozu herausfinden?</p>
<p>Wenn du einen unportablen Namen für den Typen willst, benutze <code>typeid(T).name()</code> , mit einem <code>#include &lt;typeinfo&gt;</code> . Für mehr als Debug-/Logzwecke solltest du diesen Namen aber nicht benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2065367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2065367</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 18 May 2011 17:18:10 GMT</pubDate></item><item><title><![CDATA[Reply to Typ einer Instanz eines Templates ermitteln ? on Wed, 18 May 2011 17:19:41 GMT]]></title><description><![CDATA[<p>Super , dankeschön.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2065368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2065368</guid><dc:creator><![CDATA[Bacid90210]]></dc:creator><pubDate>Wed, 18 May 2011 17:19:41 GMT</pubDate></item></channel></rss>