<?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[Keine Überladung bei verschiedenen parametern]]></title><description><![CDATA[<p>wieso ist nach standard folgendes ein Fehler:</p>
<pre><code>void f(int const) {}
void f(int) {}
</code></pre>
<p>sind doch verschiedene parameter!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/320526/keine-überladung-bei-verschiedenen-parametern</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 02:40:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/320526.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Oct 2013 16:30:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:30:51 GMT]]></title><description><![CDATA[<p>wieso ist nach standard folgendes ein Fehler:</p>
<pre><code>void f(int const) {}
void f(int) {}
</code></pre>
<p>sind doch verschiedene parameter!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357127</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357127</guid><dc:creator><![CDATA[const-pram]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:34:37 GMT]]></title><description><![CDATA[<p>Und wie würden sich die Argumente unterscheiden?</p>
<pre><code>void foo(const int);

// ...

const int i;
int j;
f(i);
f(j);
</code></pre>
<p>Das wäre alles das gleiche, da das const im foo hier bloß ein Implementierungsdetails von foo wäre, kein Teil der Schnittstelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357130</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357130</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:34:37 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:34:38 GMT]]></title><description><![CDATA[<p>Der Aufruf ist exakt derselbe. Das const hat nur Auswirkungen auf die Interna der Funktion und nicht nach außen. D.h. ein Objekt muss in beiden Fällen kopierbar sein, um mit dieser Funktion aufgerufen zu werden.</p>
<p>Das hier ist sehr wohl zulässig:</p>
<pre><code>void f(int &amp;&amp;){}
void f(int const&amp;) {}
void f(int) {}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2357131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357131</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:34:38 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:39:08 GMT]]></title><description><![CDATA[<p>§8.3.5/5 schrieb:</p>
<blockquote>
<p>After producing the list of parameter types, any top-level <em>cv-qualifiers</em> modifying a parameter type are deleted when forming the function type.</p>
</blockquote>
<p>Das ist der Natur der Sprache innewohnend, da bei einer solchen Überladung für beide Varianten äußerlich kein Unterschied existiert und damit immer eine Ambiguität entsteht.</p>
<p>Edit: Dritter? Sagt mal, seid ihr auch ständig auf Streife?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357132</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:39:08 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:39:36 GMT]]></title><description><![CDATA[<p>Sone schrieb:</p>
<blockquote>
<p>§8.3.5/5 schrieb:</p>
<blockquote>
<p>After producing the list of parameter types, any top-level <em>cv-qualifiers</em> modifying a parameter type are deleted when forming the function type.</p>
</blockquote>
</blockquote>
<p>Aber nur von den Parametertypen! Eine const-Überladung des Rückgabetyps wäre in Ordnung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357133</guid><dc:creator><![CDATA[obvious troll]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:43:56 GMT]]></title><description><![CDATA[<p>obvious troll schrieb:</p>
<blockquote>
<p>Sone schrieb:</p>
<blockquote>
<p>§8.3.5/5 schrieb:</p>
<blockquote>
<p>After producing the list of parameter types, any top-level <em>cv-qualifiers</em> modifying a parameter type are deleted when forming the function type.</p>
</blockquote>
</blockquote>
<p>Aber nur von den Parametertypen! Eine const-Überladung des Rückgabetyps wäre in Ordnung.</p>
</blockquote>
<p>Edit: Ach, <strong>du</strong> bist ein <em>offensichtlicher Troll</em>! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357134</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:43:56 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 16:47:00 GMT]]></title><description><![CDATA[<p>Sone schrieb:</p>
<blockquote>
<p>obvious troll schrieb:</p>
<blockquote>
<p>Sone schrieb:</p>
<blockquote>
<p>§8.3.5/5 schrieb:</p>
<blockquote>
<p>After producing the list of parameter types, any top-level <em>cv-qualifiers</em> modifying a parameter type are deleted when forming the function type.</p>
</blockquote>
</blockquote>
<p>Aber nur von den Parametertypen! Eine const-Überladung des Rückgabetyps wäre in Ordnung.</p>
</blockquote>
<p>Edit: Ach, <strong>du</strong> bist ein <em>offensichtlicher Troll</em>! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /></p>
</blockquote>
<p>Bevor da noch jemand drauf reinfällt, hier die Richtigstellung:</p>
<p>C++Standard, 13.1/2 schrieb:</p>
<blockquote>
<p>Function declarations that differ only in the return type cannot be overloaded.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2357135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357135</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 01 Oct 2013 16:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 17:16:11 GMT]]></title><description><![CDATA[<p>Etwas ähnliches geht aber im Zusammenhang mit Memberfunktionen:</p>
<pre><code>class C {
    public:
        void f(int i) {
                cout &lt;&lt; &quot;non-const&quot; &lt;&lt; endl;
        }
        void f(int i) const {
                cout &lt;&lt; &quot;const&quot; &lt;&lt; endl;
        }
};
</code></pre>
<p>Hier kommt es aber auf die <em>const</em>ness des Objektes an und nicht des Parameters.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357142</guid><dc:creator><![CDATA[philipp2100]]></dc:creator><pubDate>Tue, 01 Oct 2013 17:16:11 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 17:18:38 GMT]]></title><description><![CDATA[<p>philipp2100 schrieb:</p>
<blockquote>
<p>Etwas ähnliches geht aber im Zusammenhang mit Memberfunktionen:</p>
<pre><code>class C {
    public:
        void f(int i) {
                cout &lt;&lt; &quot;non-const&quot; &lt;&lt; endl;
        }
        void f(int i) const {
                cout &lt;&lt; &quot;const&quot; &lt;&lt; endl;
        }
};
</code></pre>
<p>Hier kommt es aber auf die <em>const</em>ness des Objektes an und nicht des Parameters.</p>
</blockquote>
<p>Nope. Du hast wohl nicht verstanden, was <strong>top-level</strong> cv-qualifiers bedeutet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357144</guid><dc:creator><![CDATA[noope]]></dc:creator><pubDate>Tue, 01 Oct 2013 17:18:38 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 17:39:42 GMT]]></title><description><![CDATA[<blockquote>
<p>Nope. Du hast wohl nicht verstanden, was top-level cv-qualifiers bedeutet.</p>
</blockquote>
<p>Doch. Vllt. hast du nicht verstanden, was &quot;modifying a parameter type&quot; bedeutet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357149</guid><dc:creator><![CDATA[philipp2100]]></dc:creator><pubDate>Tue, 01 Oct 2013 17:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 17:46:09 GMT]]></title><description><![CDATA[<p>philipp2100 schrieb:</p>
<blockquote>
<blockquote>
<p>Nope. Du hast wohl nicht verstanden, was top-level cv-qualifiers bedeutet.</p>
</blockquote>
<p>Doch. Vllt. hast du nicht verstanden, was &quot;modifying a parameter type&quot; bedeutet.</p>
</blockquote>
<p>Der <code>this</code> -Parameter hat aber keinen top-level <em>cv-qualifier</em> (welcher indes den Zeiger selbst konstant macht, was aber überflüssig ist, da <code>this</code> ein prvalue ist), sondern nur einen, der den Pointee-Typen verändert.</p>
<p>Und was soll 'modifying a parameter type' heißen? Den Parametertypen verändern, auf gut Deutsch....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357152</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 01 Oct 2013 17:46:09 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 18:18:04 GMT]]></title><description><![CDATA[<p>Der &quot;this&quot;-Pointer ist aber kein Parameter der Parameterliste, nur ein impliziter Parameter. Bis ich die entsprechende Stelle im Stroustrup finde:</p>
<p><a href="http://stackoverflow.com/questions/3056655/can-overloading-is-possible-with-two-version-of-function-constant-member-functi" rel="nofollow">http://stackoverflow.com/questions/3056655/can-overloading-is-possible-with-two-version-of-function-constant-member-functi</a><br />
<a href="http://prashanth-cpp.blogspot.de/2007/08/overloading-const-and-non-const-member.html" rel="nofollow">http://prashanth-cpp.blogspot.de/2007/08/overloading-const-and-non-const-member.html</a></p>
<p>edit: S. 444, Kap. 16.3.2: Iterators<br />
<a href="http://books.google.de/books?id=KW1F9GPUFjkC&amp;pg=PA489&amp;lpg=PA489&amp;dq=stroustrup+16.3.2+iterators&amp;source=bl&amp;ots=zn_U2O7DKt&amp;sig=Leueq0ulKtNJnhzj-Px7Ju2qTW8&amp;hl=de&amp;sa=X&amp;ei=YBFLUrjPM6aU4ASr44DIAQ&amp;ved=0CFsQ6AEwBg#v=onepage&amp;q=stroustrup%2016.3.2%20iterators&amp;f=false" rel="nofollow">http://books.google.de/books?id=KW1F9GPUFjkC&amp;pg=PA489&amp;lpg=PA489&amp;dq=stroustrup+16.3.2+iterators&amp;source=bl&amp;ots=zn_U2O7DKt&amp;sig=Leueq0ulKtNJnhzj-Px7Ju2qTW8&amp;hl=de&amp;sa=X&amp;ei=YBFLUrjPM6aU4ASr44DIAQ&amp;ved=0CFsQ6AEwBg#v=onepage&amp;q=stroustrup 16.3.2 iterators&amp;f=false</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357156</guid><dc:creator><![CDATA[philipp2100]]></dc:creator><pubDate>Tue, 01 Oct 2013 18:18:04 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 18:10:54 GMT]]></title><description><![CDATA[<p>philipp2100 schrieb:</p>
<blockquote>
<p>Der &quot;this&quot;-Pointer ist aber kein Parameter der Parameterliste, nur ein impliziter Parameter.</p>
</blockquote>
<p>Natürlich geht Overloading, das streitet doch keiner ab!<br />
Es hat nur nichts mit dieser Regel zu tun. Denn, wie <strong>So'n e</strong>ifrige Standardzitierer* schon sagte, this hat kein top-level cv.</p>
<p>*Hehe, Wortwitz. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357157</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357157</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Tue, 01 Oct 2013 18:10:54 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 18:11:37 GMT]]></title><description><![CDATA[<blockquote>
<p>impliziter Parameter.</p>
</blockquote>
<p>Was soll denn das sein?</p>
<p>Gut, ich sollte mich hüten, von Parametern zu reden. Aber hier noch mehr STandard:</p>
<blockquote>
<p>The type of <code>this</code> in a member function of a class <code>X</code> is <code>X*</code> .<br />
If the member function is declared <code>const</code> , the type of this is <code>const X*</code> , if the member function is declared <code>volatile</code> , the type of <code>this</code> is <code>volatile X*</code> , and if the member function is declared <code>const volatile</code> , the type of this is <code>const volatile X*</code> .</p>
</blockquote>
<blockquote>
<p>Hehe, Wortwitz.</p>
</blockquote>
<p>Gut, dieser ist nicht gut, aber seis drum: &quot;Was hast n'a 'tan?&quot; (Kurz für Was hast' denn da getan?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357161</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 01 Oct 2013 18:11:37 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 18:15:22 GMT]]></title><description><![CDATA[<blockquote>
<p>Natürlich geht Overloading, das streitet doch keiner ab!</p>
</blockquote>
<p>Doch, noope. Zitat:</p>
<blockquote>
<p>Nope.</p>
</blockquote>
<p>Ich sprach ja auch von etwas <strong>ähnlichem</strong>.</p>
<p>Sone schrieb:</p>
<blockquote>
<blockquote>
<p>impliziter Parameter.</p>
</blockquote>
<p>Was soll denn das sein?</p>
</blockquote>
<p>Einer der nicht explizit angegeben ist. :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357163</guid><dc:creator><![CDATA[philipp2100]]></dc:creator><pubDate>Tue, 01 Oct 2013 18:15:22 GMT</pubDate></item><item><title><![CDATA[Reply to Keine Überladung bei verschiedenen parametern on Tue, 01 Oct 2013 18:31:28 GMT]]></title><description><![CDATA[<p>philipp2100 schrieb:</p>
<blockquote>
<blockquote>
<p>Natürlich geht Overloading, das streitet doch keiner ab!</p>
</blockquote>
<p>Doch, noope. Zitat:</p>
<blockquote>
<p>Nope.</p>
</blockquote>
</blockquote>
<p>Das bezieht sich auf das Ähnliche.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2357168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2357168</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Tue, 01 Oct 2013 18:31:28 GMT</pubDate></item></channel></rss>