<?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::vector in eigenes Namespace unter neuem Namen importieren]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich moechte folgendes machen</p>
<pre><code class="language-cpp">namespace AB
{
typedef std::vector Vector;
}
</code></pre>
<p>Wie ihr euch denken koennt, funktioniert das so nicht. Wie mache ich es richtig? Geht sowas ueberhaupt? Ich habe schon diverse Moeglichkeiten (mit typename und template und ...) ausprobiert. Vergeblich.</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/132996/std-vector-in-eigenes-namespace-unter-neuem-namen-importieren</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 18:11:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/132996.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Jan 2006 16:38:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 16:38:38 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich moechte folgendes machen</p>
<pre><code class="language-cpp">namespace AB
{
typedef std::vector Vector;
}
</code></pre>
<p>Wie ihr euch denken koennt, funktioniert das so nicht. Wie mache ich es richtig? Geht sowas ueberhaupt? Ich habe schon diverse Moeglichkeiten (mit typename und template und ...) ausprobiert. Vergeblich.</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966523</guid><dc:creator><![CDATA[Apollon]]></dc:creator><pubDate>Sat, 14 Jan 2006 16:38:38 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 17:15:21 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>haste mal using versucht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966554</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966554</guid><dc:creator><![CDATA[Konrad]]></dc:creator><pubDate>Sat, 14 Jan 2006 17:15:21 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 17:21:40 GMT]]></title><description><![CDATA[<p>Du meinst</p>
<pre><code class="language-cpp">namespace AB
{
using std::vector;
}
</code></pre>
<p>Ich will es ja so nicht haben. Ich will es als <strong>V</strong>ector und nicht <strong>v</strong>ector haben (Ich habe einen Grund dafuer aber bitte nicht danach fragen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966559</guid><dc:creator><![CDATA[Apollon]]></dc:creator><pubDate>Sat, 14 Jan 2006 17:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 17:27:48 GMT]]></title><description><![CDATA[<p>Achso. Ich hatte gedacht das es nicht auf das große 'V' ankommt. Naja, dafür weiß ich keine Lösung.<br />
Vielleicht musste auf template-typedefs warten.. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/966567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966567</guid><dc:creator><![CDATA[Konrad]]></dc:creator><pubDate>Sat, 14 Jan 2006 17:27:48 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 18:17:37 GMT]]></title><description><![CDATA[<p>Wenn es nicht um die Template-Eigenschaft geht, kannst du auch Vector von std::vector&lt;Typ&gt; ableiten und die Konstruktoren implementieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966623</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 14 Jan 2006 18:17:37 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 18:38:07 GMT]]></title><description><![CDATA[<p>Die Templateeigenschaft moechte ich schon beibehalten. Das ist es ja. Sonst koennte ich ja auch einfach typedef std::vector&lt; TYP &gt; Vector machen.</p>
<p>Es scheint wohl in der Tat nicht zu gehen: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndeepc/html/deep08032000.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndeepc/html/deep08032000.asp</a>. Schade.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966655</guid><dc:creator><![CDATA[Apollon]]></dc:creator><pubDate>Sat, 14 Jan 2006 18:38:07 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 19:00:03 GMT]]></title><description><![CDATA[<p>Izz, was schreib ich denn, gerade dann geht das:</p>
<pre><code class="language-cpp">template &lt;typename T&gt;
class Vector : public std::vector&lt;T&gt;
{
    // alle benötigten Konstruktoren implementieren
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/966674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966674</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 14 Jan 2006 19:00:03 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 20:39:00 GMT]]></title><description><![CDATA[<p>Man betrachte folgenden Fall:</p>
<pre><code class="language-cpp">template &lt;typename T&gt;
class Vector : public std::vector&lt;T&gt;
{
    // alle benötigten Konstruktoren implementieren
};

int main()
{
    Vector* v = new Vector&lt;int&gt;;

    delete v; // destructor von std::vector wird nicht aufgerufen da nicht virtual

    return 0;
}
</code></pre>
<p>Das ist keine praktikable Loesung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966735</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966735</guid><dc:creator><![CDATA[Apollon]]></dc:creator><pubDate>Sat, 14 Jan 2006 20:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 21:54:51 GMT]]></title><description><![CDATA[<p>Quark, der Destructor von Basisklassen wird immer aufgerufen. Virtual ist für die andere Richtung verantwortlich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966779</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Sat, 14 Jan 2006 21:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 22:13:21 GMT]]></title><description><![CDATA[<blockquote>
<p>In the first alternative (delete object), if the static type of the operand is different from its dynamic type, the<br />
static type shall be a base class of the operand’s dynamic type and the static type shall have a virtual<br />
destructor or the behavior is undefined.</p>
</blockquote>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966791</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966791</guid><dc:creator><![CDATA[FireFlow]]></dc:creator><pubDate>Sat, 14 Jan 2006 22:13:21 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 22:34:30 GMT]]></title><description><![CDATA[<p>LordJaxom schrieb:</p>
<blockquote>
<p>Quark, der Destructor von Basisklassen wird immer aufgerufen. Virtual ist für die andere Richtung verantwortlich.</p>
</blockquote>
<pre><code class="language-cpp">class Base 
{
};

class Derieved : public Base
{
};

int main()
{
    Base* b = new Base();

    delete b; // hier soll der destructor von derieved aufgerufen werden? :open_mouth: 

    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/966798</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966798</guid><dc:creator><![CDATA[Apollon]]></dc:creator><pubDate>Sat, 14 Jan 2006 22:34:30 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sat, 14 Jan 2006 22:42:05 GMT]]></title><description><![CDATA[<p>dein erstes beispiel war aber</p>
<pre><code class="language-cpp">Derived *d = new Derived()
</code></pre>
<p>und da geht das.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/966802</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966802</guid><dc:creator><![CDATA[surfing with the alien]]></dc:creator><pubDate>Sat, 14 Jan 2006 22:42:05 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sun, 15 Jan 2006 11:07:05 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3025">@Apollon</a>:<br />
Schliesse mit surfingusw an, das zweite Beispiel ist genau die andere Richtung, die ich im letzten Post auch erwähnte <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>
]]></description><link>https://www.c-plusplus.net/forum/post/966918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/966918</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Sun, 15 Jan 2006 11:07:05 GMT</pubDate></item><item><title><![CDATA[Reply to std::vector in eigenes Namespace unter neuem Namen importieren on Sun, 15 Jan 2006 14:26:29 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3025">@Apollon</a><br />
In Ermangelung eines Template-Typedefs bleibt dir folgende Annäherung:</p>
<pre><code class="language-cpp">#include &lt;vector&gt;
namespace Foo {
template &lt;class T&gt;
struct VectorT {
    typedef std::vector&lt;T&gt; type;
};

// und später
void func() {
    VectorT&lt;int&gt;::type v;

}

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/967076</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/967076</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Sun, 15 Jan 2006 14:26:29 GMT</pubDate></item></channel></rss>