<?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[Member Funktionen Überladen bei Vererbungen]]></title><description><![CDATA[<p>Hallo,<br />
hab grade ein kleines Problem trotz mehrmaligen lesen verstehe ich folgenden Text nicht:</p>
<p>C++ Primer 5th schrieb:</p>
<blockquote>
<p>The access to the overloaded<br />
versions that are not otherwise redefined by the derived class will be the access in<br />
effect at the point of the using declaration.</p>
</blockquote>
<p>Hier ein größterer Ausschnitt damit ihr auch wisst worum es geht.</p>
<p>C++ Primer 5th schrieb:</p>
<blockquote>
<p>Instead of overriding every base-class version that it inherits, a derived class can<br />
provide a using declaration (§15.5, p. 615) for the overloaded member. A using<br />
declaration specifies only a name; it may not specify a parameter list. Thus, a using<br />
declaration for a base-class member function adds all the overloaded instances of that<br />
function to the scope of the derived class. Having brought all the names into its scope,<br />
the derived class needs to define only those functions that truly depend on its type. It<br />
can use the inherited definitions for the others.<br />
The normal rules for a using declaration inside a class apply to names of<br />
overloaded functions (§15.5, p. 615); every overloaded instance of the function in the<br />
base class must be accessible to the derived class. The access to the overloaded<br />
versions that are not otherwise redefined by the derived class will be the access in<br />
effect at the point of the using declaration.</p>
</blockquote>
<p>Hoffe mir kann das jemand erklären.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/326926/member-funktionen-überladen-bei-vererbungen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 26 May 2026 01:31:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326926.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jul 2014 17:53:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Member Funktionen Überladen bei Vererbungen on Mon, 14 Jul 2014 17:53:39 GMT]]></title><description><![CDATA[<p>Hallo,<br />
hab grade ein kleines Problem trotz mehrmaligen lesen verstehe ich folgenden Text nicht:</p>
<p>C++ Primer 5th schrieb:</p>
<blockquote>
<p>The access to the overloaded<br />
versions that are not otherwise redefined by the derived class will be the access in<br />
effect at the point of the using declaration.</p>
</blockquote>
<p>Hier ein größterer Ausschnitt damit ihr auch wisst worum es geht.</p>
<p>C++ Primer 5th schrieb:</p>
<blockquote>
<p>Instead of overriding every base-class version that it inherits, a derived class can<br />
provide a using declaration (§15.5, p. 615) for the overloaded member. A using<br />
declaration specifies only a name; it may not specify a parameter list. Thus, a using<br />
declaration for a base-class member function adds all the overloaded instances of that<br />
function to the scope of the derived class. Having brought all the names into its scope,<br />
the derived class needs to define only those functions that truly depend on its type. It<br />
can use the inherited definitions for the others.<br />
The normal rules for a using declaration inside a class apply to names of<br />
overloaded functions (§15.5, p. 615); every overloaded instance of the function in the<br />
base class must be accessible to the derived class. The access to the overloaded<br />
versions that are not otherwise redefined by the derived class will be the access in<br />
effect at the point of the using declaration.</p>
</blockquote>
<p>Hoffe mir kann das jemand erklären.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2408588</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408588</guid><dc:creator><![CDATA[CraftPlorer]]></dc:creator><pubDate>Mon, 14 Jul 2014 17:53:39 GMT</pubDate></item><item><title><![CDATA[Reply to Member Funktionen Überladen bei Vererbungen on Mon, 14 Jul 2014 18:06:33 GMT]]></title><description><![CDATA[<p>Das bedeutet nur, dass die Sichtbarket ( <code>private, protected, public</code> ) der deklarierten Member davon abhängt, wie die Sichtbarkeit an der Stelle ist, wo entweder die <code>using</code> Deklaration steht, oder eine Überladung definiert wird.</p>
<p>z.B.</p>
<pre><code class="language-cpp">struct base{
  void nufnuf() const {}
  void nifnif() const {}
};

class derived : public base{
  using base::nufnuf; // private!
public:
  using base::nifnif;
};

int main(){
  derived d;
  d.nifnif();
  d.nufnuf(); // Fehler (inaccessible)
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2408591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408591</guid><dc:creator><![CDATA[Furble Wurble]]></dc:creator><pubDate>Mon, 14 Jul 2014 18:06:33 GMT</pubDate></item><item><title><![CDATA[Reply to Member Funktionen Überladen bei Vererbungen on Mon, 14 Jul 2014 18:09:25 GMT]]></title><description><![CDATA[<p>Es geht um Sichtbarkeit bei using. Zum Beispiel:</p>
<pre><code>class base
{
protected:
  void foo();
};

class derived : public base
{
public:
  using base::foo;  // foo ist nun public
};
</code></pre>
<p>Das hat dann auch Auswirkungen auf die Sichtbarkeit und das Überschreiben von Funktionen durch die abgeleitete Klasse. Für Beispiele dazu, siehe:<br />
<a href="http://en.cppreference.com/w/cpp/language/using_declaration" rel="nofollow">http://en.cppreference.com/w/cpp/language/using_declaration</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2408592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408592</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 14 Jul 2014 18:09:25 GMT</pubDate></item><item><title><![CDATA[Reply to Member Funktionen Überladen bei Vererbungen on Mon, 14 Jul 2014 18:25:07 GMT]]></title><description><![CDATA[<p>Danke euch beiden. Ist ja irgendwie einleuchtend.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2408600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408600</guid><dc:creator><![CDATA[CraftPlorer]]></dc:creator><pubDate>Mon, 14 Jul 2014 18:25:07 GMT</pubDate></item></channel></rss>