<?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[this-&amp;gt;a.foo&amp;lt;Y&amp;gt;(); erzeught Fehler]]></title><description><![CDATA[<p>Hallo!</p>
<p>Folgender Quelltext:</p>
<pre><code class="language-cpp">class A
{
  template &lt;class X&gt;
  void foo(X x = 0) const
  {
  }
};

template &lt;class Y&gt;
class B
{
  A a;
  void bar(Y y)
  {
    this-&gt;a.foo&lt;Y&gt;();
  }
};
</code></pre>
<p>erzeugt beim kompilieren die folgenden Fehler:</p>
<pre><code>test.cpp: In member function ‘void B&lt;Y&gt;::bar(Y)’:
test.cpp:15: error: expected primary-expression before ‘&gt;’ token
test.cpp:15: error: expected primary-expression before ‘)’ token
</code></pre>
<p>Warum?<br />
Warum funktioniert es, wenn ich das <code>this-&gt;</code> weglasse?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204895/this-gt-a-foo-lt-y-gt-erzeught-fehler</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 19:43:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204895.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Feb 2008 23:20:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to this-&amp;gt;a.foo&amp;lt;Y&amp;gt;(); erzeught Fehler on Thu, 07 Feb 2008 23:20:13 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Folgender Quelltext:</p>
<pre><code class="language-cpp">class A
{
  template &lt;class X&gt;
  void foo(X x = 0) const
  {
  }
};

template &lt;class Y&gt;
class B
{
  A a;
  void bar(Y y)
  {
    this-&gt;a.foo&lt;Y&gt;();
  }
};
</code></pre>
<p>erzeugt beim kompilieren die folgenden Fehler:</p>
<pre><code>test.cpp: In member function ‘void B&lt;Y&gt;::bar(Y)’:
test.cpp:15: error: expected primary-expression before ‘&gt;’ token
test.cpp:15: error: expected primary-expression before ‘)’ token
</code></pre>
<p>Warum?<br />
Warum funktioniert es, wenn ich das <code>this-&gt;</code> weglasse?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1451668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451668</guid><dc:creator><![CDATA[Questioner]]></dc:creator><pubDate>Thu, 07 Feb 2008 23:20:13 GMT</pubDate></item><item><title><![CDATA[Reply to this-&amp;gt;a.foo&amp;lt;Y&amp;gt;(); erzeught Fehler on Thu, 07 Feb 2008 23:23:58 GMT]]></title><description><![CDATA[<p>Welcher Compiler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1451669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451669</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Thu, 07 Feb 2008 23:23:58 GMT</pubDate></item><item><title><![CDATA[Reply to this-&amp;gt;a.foo&amp;lt;Y&amp;gt;(); erzeught Fehler on Thu, 07 Feb 2008 23:27:31 GMT]]></title><description><![CDATA[<p>gcc 4.1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1451671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451671</guid><dc:creator><![CDATA[Questioner]]></dc:creator><pubDate>Thu, 07 Feb 2008 23:27:31 GMT</pubDate></item><item><title><![CDATA[Reply to this-&amp;gt;a.foo&amp;lt;Y&amp;gt;(); erzeught Fehler on Thu, 07 Feb 2008 23:41:12 GMT]]></title><description><![CDATA[<p>14.2§4</p>
<pre><code class="language-cpp">this-&gt;a.template foo&lt;Y&gt;();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1451674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451674</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Thu, 07 Feb 2008 23:41:12 GMT</pubDate></item></channel></rss>