<?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[namespace Frage]]></title><description><![CDATA[<p>Guten Abend!</p>
<p>Folgender Code wirft bei mir im VS einen Fehler:</p>
<pre><code>#include &lt;boost/optional.hpp&gt;

namespace A {

namespace B {

stuct Foo {
   boost::optional&lt;int&gt; var1; // Liefert Fehler &quot;Error: namespace A::boost has no member optional&quot;
   ::boost::optional&lt;int&gt; var2; // Das geht
</code></pre>
<p>Ist das immer so, dass der Compiler in einem namespace { } Block ALLE Typen aus diesem Namespace Block erwartet? Müsste ich dann nicht auch überall ::std schreiben (das wäre ja doof)?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/329910/namespace-frage</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 20:55:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/329910.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Dec 2014 16:05:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to namespace Frage on Sat, 13 Dec 2014 16:05:04 GMT]]></title><description><![CDATA[<p>Guten Abend!</p>
<p>Folgender Code wirft bei mir im VS einen Fehler:</p>
<pre><code>#include &lt;boost/optional.hpp&gt;

namespace A {

namespace B {

stuct Foo {
   boost::optional&lt;int&gt; var1; // Liefert Fehler &quot;Error: namespace A::boost has no member optional&quot;
   ::boost::optional&lt;int&gt; var2; // Das geht
</code></pre>
<p>Ist das immer so, dass der Compiler in einem namespace { } Block ALLE Typen aus diesem Namespace Block erwartet? Müsste ich dann nicht auch überall ::std schreiben (das wäre ja doof)?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2432681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2432681</guid><dc:creator><![CDATA[nsFrage]]></dc:creator><pubDate>Sat, 13 Dec 2014 16:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to namespace Frage on Sat, 13 Dec 2014 16:09:32 GMT]]></title><description><![CDATA[<p>Nein: <a href="http://ideone.com/PQSQNb" rel="nofollow">http://ideone.com/PQSQNb</a><br />
Du hast einen anderen Fehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2432685</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2432685</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 13 Dec 2014 16:09:32 GMT</pubDate></item><item><title><![CDATA[Reply to namespace Frage on Sat, 13 Dec 2014 16:14:45 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Nein: <a href="http://ideone.com/PQSQNb" rel="nofollow">http://ideone.com/PQSQNb</a><br />
Du hast einen anderen Fehler.</p>
</blockquote>
<p>Ah, verstehe. Dh. wenn es in ns2 ein foo::func() gäbe, würde er das benutzen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2432687</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2432687</guid><dc:creator><![CDATA[nsFrage]]></dc:creator><pubDate>Sat, 13 Dec 2014 16:14:45 GMT</pubDate></item><item><title><![CDATA[Reply to namespace Frage on Sat, 13 Dec 2014 16:16:55 GMT]]></title><description><![CDATA[<p>nsFrage schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>Nein: <a href="http://ideone.com/PQSQNb" rel="nofollow">http://ideone.com/PQSQNb</a><br />
Du hast einen anderen Fehler.</p>
</blockquote>
<p>Ah, verstehe. Dh. wenn es in ns2 ein foo::func() gäbe, würde er das benutzen?</p>
</blockquote>
<p>Ich habe gerade irgendwie voll das Dejavu*: <a href="https://www.c-plusplus.net/forum/p2432683#2432683">https://www.c-plusplus.net/forum/p2432683#2432683</a></p>
<p>*Hier einige Sonderzeichen zum Einfügen: ´´``-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2432688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2432688</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 13 Dec 2014 16:16:55 GMT</pubDate></item></channel></rss>