<?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[Im Template rausfinden von welchem Typ die Variable ist]]></title><description><![CDATA[<p>Hallo,<br />
ich habe ein Template, das ich entweder mit int oder mit longint aufrufen kann (nur als Beispiel). Jetzt möchte ich innerhalb des Templates rausfinden, ob es sich um ein int oder ein longint handelt?</p>
<p>Grüße,<br />
Thomas</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/180493/im-template-rausfinden-von-welchem-typ-die-variable-ist</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 20:34:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/180493.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 May 2007 13:14:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Im Template rausfinden von welchem Typ die Variable ist on Thu, 03 May 2007 13:14:13 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe ein Template, das ich entweder mit int oder mit longint aufrufen kann (nur als Beispiel). Jetzt möchte ich innerhalb des Templates rausfinden, ob es sich um ein int oder ein longint handelt?</p>
<p>Grüße,<br />
Thomas</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278114</guid><dc:creator><![CDATA[elfstone]]></dc:creator><pubDate>Thu, 03 May 2007 13:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to Im Template rausfinden von welchem Typ die Variable ist on Thu, 03 May 2007 13:18:01 GMT]]></title><description><![CDATA[<p>Mit Type-Traits geht das. Schau dir mal die Boost.Type_Traits an oder schreib es dir selbst</p>
<pre><code class="language-cpp">template&lt;typename T&gt;
struct is_int {
  static bool const value = false;
};

template&lt;&gt;
struct is_int&lt;int&gt; {
  static bool const value = true;
};
</code></pre>
<p>(Template-Spezialisierung gibt es leider nicht für Funktionen, nur für Klassen. Sonst wäre das eine Möglichkeit)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278116</guid><dc:creator><![CDATA[rüdiger]]></dc:creator><pubDate>Thu, 03 May 2007 13:18:01 GMT</pubDate></item></channel></rss>