<?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[inline klassenfunc im namespace?]]></title><description><![CDATA[<p>hi,<br />
irgendwie krieg ich das nicht hin, eine Klassenmethode außerhalb der Klasse , innerhalb eines user namespaces mit inline zu definieren. Lasse ichs namespace weg, funktioniert das. Geht bei der Verwendung von namespaces nur eine implizite Methodendefinition?</p>
<pre><code class="language-cpp">//file.h
namespace ha 
{
 class b 
 {
    public:
      void hu() const;
 };
};
//file.cpp
#include &quot;file.h&quot;
using namespace ha
//inline geht hier nich, Funktion is dann nich aufgelöst ?
void b::hu() const {}
</code></pre>
<p>dank im vorraus<br />
chris</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/187305/inline-klassenfunc-im-namespace</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 19:43:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/187305.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Jul 2007 10:24:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to inline klassenfunc im namespace? on Wed, 18 Jul 2007 10:24:21 GMT]]></title><description><![CDATA[<p>hi,<br />
irgendwie krieg ich das nicht hin, eine Klassenmethode außerhalb der Klasse , innerhalb eines user namespaces mit inline zu definieren. Lasse ichs namespace weg, funktioniert das. Geht bei der Verwendung von namespaces nur eine implizite Methodendefinition?</p>
<pre><code class="language-cpp">//file.h
namespace ha 
{
 class b 
 {
    public:
      void hu() const;
 };
};
//file.cpp
#include &quot;file.h&quot;
using namespace ha
//inline geht hier nich, Funktion is dann nich aufgelöst ?
void b::hu() const {}
</code></pre>
<p>dank im vorraus<br />
chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327671</guid><dc:creator><![CDATA[chris19]]></dc:creator><pubDate>Wed, 18 Jul 2007 10:24:21 GMT</pubDate></item><item><title><![CDATA[Reply to inline klassenfunc im namespace? on Wed, 18 Jul 2007 10:32:54 GMT]]></title><description><![CDATA[<p>using taugt nur etwas, wenn du den Namen verwenden willst. Die Definition muß natürlich wieder im richtigen Namespace angegeben werden:</p>
<pre><code class="language-cpp">namespace ha 
{
 class b 
 {
    public:
      void hu() const;
 };
};
//file.cpp
#include &quot;file.h&quot;
namespace ha
{
  void b::hu() const {}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1327678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327678</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 18 Jul 2007 10:32:54 GMT</pubDate></item><item><title><![CDATA[Reply to inline klassenfunc im namespace? on Fri, 20 Jul 2007 14:32:10 GMT]]></title><description><![CDATA[<p>hi, es geht so auch nicht, wenn ich eine Methode innerhalb eines namespaces inline definieren will.</p>
<pre><code class="language-cpp">namespace dernamespace {
 inline void klasse::func() 
 {}
; //Endnamesp
</code></pre>
<p>Der Compiler sagt: 1&gt;main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: long __thiscall ......<br />
entferne ich inline, ist alles in Ordnung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1329350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1329350</guid><dc:creator><![CDATA[chris19]]></dc:creator><pubDate>Fri, 20 Jul 2007 14:32:10 GMT</pubDate></item><item><title><![CDATA[Reply to inline klassenfunc im namespace? on Mon, 23 Jul 2007 06:21:18 GMT]]></title><description><![CDATA[<p>Erstmal beendet man einen Namespace nicht mit dem Semikolon <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Und zweitens kannst du inline-Funktionen nicht in eigene CPP-Files auslagern (inline sagt dem Compiler, daß er den Quelltext direkt anstelle des Funktionsaufrufes einsetzen soll - aber dazu braucht er den Quelltext dort, wo die Funktion verwendet werden soll)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1330522</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1330522</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 23 Jul 2007 06:21:18 GMT</pubDate></item></channel></rss>