<?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[Zwei Typen auf Gleichheit prüfen]]></title><description><![CDATA[<p>Hi</p>
<p>Angenommen, ich habe zwei Templateparameter:</p>
<pre><code class="language-cpp">template&lt;class T, class I&gt;
</code></pre>
<p>Wie kann ich die auf Gleichheit prüfen?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/288143/zwei-typen-auf-gleichheit-prüfen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 20 Aug 2026 03:16:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/288143.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 Jun 2011 08:07:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zwei Typen auf Gleichheit prüfen on Sat, 11 Jun 2011 08:07:05 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Angenommen, ich habe zwei Templateparameter:</p>
<pre><code class="language-cpp">template&lt;class T, class I&gt;
</code></pre>
<p>Wie kann ich die auf Gleichheit prüfen?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2076626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2076626</guid><dc:creator><![CDATA[generetics]]></dc:creator><pubDate>Sat, 11 Jun 2011 08:07:05 GMT</pubDate></item><item><title><![CDATA[Reply to Zwei Typen auf Gleichheit prüfen on Sat, 11 Jun 2011 08:11:19 GMT]]></title><description><![CDATA[<p>Etwa <a href="http://ideone.com/0QlaV" rel="nofollow">so</a>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2076627</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2076627</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Sat, 11 Jun 2011 08:11:19 GMT</pubDate></item><item><title><![CDATA[Reply to Zwei Typen auf Gleichheit prüfen on Sat, 11 Jun 2011 08:25:53 GMT]]></title><description><![CDATA[<p>EOutOfResources schrieb:</p>
<blockquote>
<p>Etwa <a href="http://ideone.com/0QlaV" rel="nofollow">so</a>.</p>
</blockquote>
<p>ja, aber nicht zur Compilezeit. Dafür gibts folgendes:</p>
<pre><code class="language-cpp">template &lt;class A, class B&gt;
struct SameType
{
  static const bool value = false;
};

template &lt;class A&gt;
struct SameType&lt;A,A&gt;
{
  static const bool value = true;
};
</code></pre>
<p>Gibts auch schon vorgefertigt in boost.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2076630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2076630</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Sat, 11 Jun 2011 08:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to Zwei Typen auf Gleichheit prüfen on Sat, 11 Jun 2011 08:27:56 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>ja, aber nicht zur Compilezeit.</p>
</blockquote>
<p>Steht auch nirgends aber deine Lösung ist natürlich um ein vielfaches eleganter. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2076632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2076632</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Sat, 11 Jun 2011 08:27:56 GMT</pubDate></item></channel></rss>