<?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[std::string Vorwärtsdeklarieren]]></title><description><![CDATA[<p>Blah,</p>
<p>Wollte mal wissen, ob das hier so erlaubt ist.</p>
<pre><code class="language-cpp">namespace std
{
	template &lt;typename, typename, typename&gt;
	struct basic_string;

	template &lt;typename&gt;
	struct char_traits;

	template &lt;typename&gt;
	struct allocator;

	typedef basic_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt;&gt; string;
}
</code></pre>
<p>Insbesondere das typedef ist IMO ein Problem, aber sicher bin ich mir nicht. Evtl andere Möglichkeiten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/301504/std-string-vorwärtsdeklarieren</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 23:50:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/301504.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Mar 2012 19:58:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::string Vorwärtsdeklarieren on Wed, 28 Mar 2012 19:58:32 GMT]]></title><description><![CDATA[<p>Blah,</p>
<p>Wollte mal wissen, ob das hier so erlaubt ist.</p>
<pre><code class="language-cpp">namespace std
{
	template &lt;typename, typename, typename&gt;
	struct basic_string;

	template &lt;typename&gt;
	struct char_traits;

	template &lt;typename&gt;
	struct allocator;

	typedef basic_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt;&gt; string;
}
</code></pre>
<p>Insbesondere das typedef ist IMO ein Problem, aber sicher bin ich mir nicht. Evtl andere Möglichkeiten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2196388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2196388</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Wed, 28 Mar 2012 19:58:32 GMT</pubDate></item><item><title><![CDATA[Reply to std::string Vorwärtsdeklarieren on Wed, 28 Mar 2012 20:21:21 GMT]]></title><description><![CDATA[<p>An sich scheint mir das zwar eine technisch richtige forward-Deklaration zu sein, jedoch:</p>
<p>C++ Standard, 17.6.4.2.1 schrieb:</p>
<blockquote>
<p>The behavior of a C++ program is undefined if it adds declarations or definitions to namespace std or to a<br />
namespace within namespace std unless otherwise specified.</p>
</blockquote>
<p>Danach folgen noch mehr Klauseln, die dein Vorhaben noch genauer verbieten.</p>
<p>Der GCC kennt eine stringfwd.h die zwar ziemlich genau macht, was du hier versuchst, aber die Implementierung selber darf das natürlich machen.</p>
<p>Hast du wirklich ein Projekt, bei dem <code>#include &lt;string&gt;</code> für die Compilezeit relevant ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2196395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2196395</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 28 Mar 2012 20:21:21 GMT</pubDate></item><item><title><![CDATA[Reply to std::string Vorwärtsdeklarieren on Wed, 28 Mar 2012 20:23:40 GMT]]></title><description><![CDATA[<blockquote>
<p>Blah,</p>
</blockquote>
<p>Die netten Begrüßungen waren wohl alle aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2196396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2196396</guid><dc:creator><![CDATA[se]]></dc:creator><pubDate>Wed, 28 Mar 2012 20:23:40 GMT</pubDate></item><item><title><![CDATA[Reply to std::string Vorwärtsdeklarieren on Wed, 28 Mar 2012 20:31:02 GMT]]></title><description><![CDATA[<p>Hm, okay. Dass selbst Deklarationen verboten sind, wusste ich nicht. Auf einen Compiler-Spezifischen Header möchte ich nicht aufbauen. Ich wollte meinen Header eigentlich nur von dem restlichen Müll freihalten, der über &lt;string&gt; sonst noch so hereinkommt. Das C++ Buildsystem ist halt echt fucked up. (Eine gute, deutsche Übersetzung will mir gerade nicht einfallen. Im Arsch. Oder so.)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2196399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2196399</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Wed, 28 Mar 2012 20:31:02 GMT</pubDate></item></channel></rss>