<?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[‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’]]></title><description><![CDATA[<pre><code class="language-cpp">int main()
{
  std::vector&lt;int&gt; v;
  v.emplace_back();

  std::vector&lt;bool&gt; w;
  w.emplace_back();
}
</code></pre>
<pre><code>In function ‘int main()’:
error: ‘class std::vector&lt;bool&gt;’ has no member named ‘emplace_back’
   w.emplace_back();
     ^
</code></pre>
<p>Kein Kommentar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Jetzt reichts, ich schreibe mir einen true_vector ohne diese dummen Spässe. Gibts da schon was fertiges?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/320858/class-std-vector-lt-bool-gt-has-no-member-named-emplace_back</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 14:06:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/320858.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Oct 2013 21:06:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:06:08 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int main()
{
  std::vector&lt;int&gt; v;
  v.emplace_back();

  std::vector&lt;bool&gt; w;
  w.emplace_back();
}
</code></pre>
<pre><code>In function ‘int main()’:
error: ‘class std::vector&lt;bool&gt;’ has no member named ‘emplace_back’
   w.emplace_back();
     ^
</code></pre>
<p>Kein Kommentar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Jetzt reichts, ich schreibe mir einen true_vector ohne diese dummen Spässe. Gibts da schon was fertiges?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360318</guid><dc:creator><![CDATA[vector&amp;lt;fool&amp;gt;]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:06:08 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:13:26 GMT]]></title><description><![CDATA[<p>vector&lt;fool&gt; schrieb:</p>
<blockquote>
<p>Gibts da schon was fertiges?</p>
</blockquote>
<p>Ja, vector&lt;char&gt; <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/2360321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360321</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:13:26 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:18:31 GMT]]></title><description><![CDATA[<blockquote>
<p>Gibts da schon was fertiges?</p>
</blockquote>
<p>Wie wäre es, wenn du einfach die explizite Spezialisierung durch das entsprechende Makro unterbindest?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360323</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:23:58 GMT]]></title><description><![CDATA[<p>Ich habe das in Templates und es wäre sehr verwirrend dem Benutzer zu verbieten, bool einzusetzen. Und per Template bool mit char zu ersetzen geht leider nicht.</p>
<p>Arcoth schrieb:</p>
<blockquote>
<blockquote>
<p>Gibts da schon was fertiges?</p>
</blockquote>
<p>Wie wäre es, wenn du einfach die explizite Spezialisierung durch das entsprechende Makro unterbindest?</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360325</guid><dc:creator><![CDATA[vector&amp;lt;fool&amp;gt;]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:23:58 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:29:43 GMT]]></title><description><![CDATA[<p>vector&lt;fool&gt; schrieb:</p>
<blockquote>
<p>Arcoth schrieb:</p>
<blockquote>
<blockquote>
<p>Gibts da schon was fertiges?</p>
</blockquote>
<p>Wie wäre es, wenn du einfach die explizite Spezialisierung durch das entsprechende Makro unterbindest?</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
</blockquote>
<p>Manche Implementierungen erlauben es, das Verhalten von vector&lt;bool&gt; zu ändern.</p>
<blockquote>
<p>Und per Template bool mit char zu ersetzen geht leider nicht.</p>
</blockquote>
<p>Spezialisierung der betroffenen Teile?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360327</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360327</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:32:46 GMT]]></title><description><![CDATA[<p>Vergiss es. Erinnerte mich dunkel daran, dass <code>STD_VECTOR_BOOL_NOT_SPECIAL</code> funktioniert, aber das ist ja doch nicht im Standard.</p>
<p>Frage mich, wieso eigentlich.</p>
<p>Edit, <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/19375">@SeppJ</a>: Der GCC bspw. erlaubt das AFAICS nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360328</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360328</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:32:46 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:34:13 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p>Edit, <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/19375">@SeppJ</a>: Der GCC bspw. erlaubt das AFAICS nicht.</p>
</blockquote>
<p>Hä?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360329</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:34:13 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:38:26 GMT]]></title><description><![CDATA[<p>vector&lt;fool&gt; schrieb:</p>
<blockquote>
<p>Ich habe das in Templates und es wäre sehr verwirrend dem Benutzer zu verbieten, bool einzusetzen. Und per Template bool mit char zu ersetzen geht leider nicht.</p>
</blockquote>
<p>evtl.</p>
<pre><code class="language-cpp">template &lt;typename T, typename... Args&gt;
void emplace_back(T&amp;&amp; c, Args&amp;&amp;... args)
{
    c.emplace_back(std::forward&lt;Args&gt;(args)...);
}
template &lt;typename A, typename Arg&gt;
void emplace_back(std::vector&lt;bool, A&gt;&amp; c, Arg&amp;&amp; arg)
{
    c.push_back(std::forward&lt;Arg&gt;(arg));
}
template &lt;typename A&gt;
void emplace_back(std::vector&lt;bool, A&gt;&amp; c)
{
    c.push_back(false);
}
</code></pre>
<p>Edit: nochmal korrigiert, für den Fall das Argument kein bool ist (dann würde sonst das allgemeine Template verwendet werden).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360330</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360330</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:38:26 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:36:51 GMT]]></title><description><![CDATA[<p>camper schrieb:</p>
<blockquote>
<p>vector&lt;fool&gt; schrieb:</p>
<blockquote>
<p>Ich habe das in Templates und es wäre sehr verwirrend dem Benutzer zu verbieten, bool einzusetzen. Und per Template bool mit char zu ersetzen geht leider nicht.</p>
</blockquote>
<p>evtl.</p>
<pre><code class="language-cpp">template &lt;typename T, typename... Args&gt;
void emplace_back(T&amp;&amp; c, Args&amp;&amp;... args)
{
    c.emplace_back(std::forward&lt;Args&gt;(args)...);
}
template &lt;typename A&gt;
void emplace_back(std::vector&lt;bool, A&gt;&amp; c, bool b = false)
{
    c.push_back(b);
}
</code></pre>
</blockquote>
<p>Super, darauf wär ich nicht gekommen. Das ist besser als meine ganzen Hacks, die ich mir überlegt habe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360331</guid><dc:creator><![CDATA[vector&amp;lt;fool&amp;gt;]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:36:51 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Mon, 14 Oct 2013 21:45:51 GMT]]></title><description><![CDATA[<p>Ich dachte, du darfst die Syntax nicht ändern. So ist es natürlich etwas anderes.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/6642">@camper</a>: Wieso für das erste (allgemeine) Funktionstemplate Temporaries erlauben?</p>
<p>volkard schrieb:</p>
<blockquote>
<p>Arcoth schrieb:</p>
<blockquote>
<p>Edit, <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/19375">@SeppJ</a>: Der GCC bspw. erlaubt das AFAICS nicht.</p>
</blockquote>
<p>Hä?</p>
</blockquote>
<p>Was ist daran unverständlich?<br />
Edit: Die Spezialisierung von <code>vector</code> liegt im Header <code>&lt;bits/stl_bvector.h&gt;</code> , und die wird in <code>&lt;vector&gt;</code> bedingungslos eingebunden. Es gibt auch keine <code>#if(n)defs</code> , welche da irgendetwas ausschließen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360334</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Mon, 14 Oct 2013 21:45:51 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 07:33:10 GMT]]></title><description><![CDATA[<blockquote>
<p>Jetzt reichts, ich schreibe mir einen true_vector ohne diese dummen Spässe</p>
</blockquote>
<p>Lebe damit! vector&lt;bool&gt; und deren Probleme sind lange bekannt und werden genauso wie auto_ptr nicht aus der Bibliothek herausgenommen.</p>
<p>Loesung: Benutze std::bitset oder boost::dynamic_bitset!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360367</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Tue, 15 Oct 2013 07:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 09:25:44 GMT]]></title><description><![CDATA[<p>knivil schrieb:</p>
<blockquote>
<p>Loesung: Benutze std::bitset oder boost::dynamic_bitset!</p>
</blockquote>
<p>Welches vector&lt;bool&gt;-Problem wird denn von bitset gelöst, außer dass bitset nicht vorgaukelt, ein vector zu sein? (Abgesehen davon, dass der TE die Ersetzung umgekehrt möchte)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360380</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 15 Oct 2013 09:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 09:34:33 GMT]]></title><description><![CDATA[<blockquote>
<p>außer dass bitset nicht vorgaukelt, ein vector zu sein?</p>
</blockquote>
<p>bitset gaukelt nicht vor, ein vector zu sein. <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/2360381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360381</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Tue, 15 Oct 2013 09:34:33 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 11:52:20 GMT]]></title><description><![CDATA[<p>vector&lt;fool&gt; schrieb:</p>
<blockquote>
<p>Und per Template bool mit char zu ersetzen geht leider nicht.</p>
</blockquote>
<p>Hm??</p>
<pre><code>std::conditional&lt;std::is_same&lt;T,bool&gt;::value, char, T&gt;::type
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2360417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360417</guid><dc:creator><![CDATA[ScottZhang]]></dc:creator><pubDate>Tue, 15 Oct 2013 11:52:20 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 13:09:38 GMT]]></title><description><![CDATA[<p>ScottZhang schrieb:</p>
<blockquote>
<pre><code>std::conditional&lt;std::is_same&lt;T,bool&gt;::value, char, T&gt;::type
</code></pre>
</blockquote>
<p>Nicht so knorke:</p>
<pre><code>template&lt;class T&gt;
class MyClass{
//...
    T&amp; operator[](std::size_t i){
        return elements[i];
    }
private:
    std::vector&lt;typename std::conditional&lt;std::is_same&lt;T,bool&gt;::value, char, T&gt;::type&gt; elements;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2360441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360441</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Tue, 15 Oct 2013 13:09:38 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 18:13:41 GMT]]></title><description><![CDATA[<p>Und der überladene Operator gibt dann wieder eine Referenz auf <code>bool</code> zurück? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Falls tatsächlich das auslagern von <code>emplace_back</code> (und anderen relevanten Funktionalitäten) in spezialisierbare Einheiten nicht möglich ist, gibt es noch</p>
<pre><code>template&lt;typename T&gt;
using Vector = std::vector&lt; typename std::conditional&lt;std::is_same&lt;T,bool&gt;::value, char, T&gt;::type &gt;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2360541</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360541</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 15 Oct 2013 18:13:41 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 20:12:15 GMT]]></title><description><![CDATA[<p>Die eigentliche Frage ist doch, wieso bietet vector&lt;bool&gt; kein emplace_back an?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360562</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360562</guid><dc:creator><![CDATA[but why]]></dc:creator><pubDate>Tue, 15 Oct 2013 20:12:15 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 20:32:18 GMT]]></title><description><![CDATA[<p>but why schrieb:</p>
<blockquote>
<p>Die eigentliche Frage ist doch, wieso bietet vector&lt;bool&gt; kein emplace_back an?</p>
</blockquote>
<p>wieder ein ballmer peak?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360566</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Tue, 15 Oct 2013 20:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 20:41:55 GMT]]></title><description><![CDATA[<p>volkard schrieb:</p>
<blockquote>
<p>but why schrieb:</p>
<blockquote>
<p>Die eigentliche Frage ist doch, wieso bietet vector&lt;bool&gt; kein emplace_back an?</p>
</blockquote>
<p>wieder ein ballmer peak?</p>
</blockquote>
<p>Nein, sie haben Herr Bebel vor kurzem entlassen - habt ihr das nicht mitbekommen?</p>
<p>Es dachten die Experten vom Komitee, dass ein <code>emplace_back</code> für <code>vector&lt;bool&gt;</code> prinzipiell unnötig ist (Perfect Forwarding ist für <code>bool</code> ja tatsächlich Überflüssig).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360568</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 15 Oct 2013 20:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 21:01:07 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p>volkard schrieb:</p>
<blockquote>
<p>but why schrieb:</p>
<blockquote>
<p>Die eigentliche Frage ist doch, wieso bietet vector&lt;bool&gt; kein emplace_back an?</p>
</blockquote>
<p>wieder ein ballmer peak?</p>
</blockquote>
<p>Nein, sie haben Herr Bebel vor kurzem entlassen - habt ihr das nicht mitbekommen?</p>
<p>Es dachten die Experten vom Komitee, dass ein <code>emplace_back</code> für <code>vector&lt;bool&gt;</code> prinzipiell unnötig ist (Perfect Forwarding ist für <code>bool</code> ja tatsächlich Überflüssig).</p>
</blockquote>
<p>Naja, das Statement ist immernoch besser als der ganze Code, den Du nüchtern produzierst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360574</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Tue, 15 Oct 2013 21:01:07 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 21:34:06 GMT]]></title><description><![CDATA[<p>Die Spezialisierung radikal auskommentieren in der STL! Ohne wenn und aber, hier wird kurzer Prozess gemacht! Und dann dynamic_bitset hernehmen, um den ganzen boost-Firlefanz erleichtern, namespace anpassen und in den STL-Ordner schieben! Problem gelöst!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360581</guid><dc:creator><![CDATA[decimad]]></dc:creator><pubDate>Tue, 15 Oct 2013 21:34:06 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 21:44:30 GMT]]></title><description><![CDATA[<p>volkard schrieb:</p>
<blockquote>
<p>Naja, das Statement ist immernoch besser als der ganze Code, den Du nüchtern produzierst.</p>
</blockquote>
<p>video meliora proboque, deteriora sequor. <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>
<p>Edit:</p>
<blockquote>
<p>Die Spezialisierung radikal auskommentieren in der STL! Ohne wenn und aber, hier wird kurzer Prozess gemacht!</p>
</blockquote>
<p>Ja, das ist eine Möglichkeit. Bloß nicht, dass dann aber merkwürdige Fehler in anderen Stellen anderer Header kommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360582</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360582</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 15 Oct 2013 21:44:30 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Tue, 15 Oct 2013 21:50:34 GMT]]></title><description><![CDATA[<p>In welchen genau, ich hab's jetzt noch nicht probiert? Ich denke die Menge an zerstörtem Code, global gesehen, würde sich in überschaubarem Rahmen halten, aber ist nur so eine Vermutung. Und derjenige, der den Code geschrieben hat, hat's ja auch verdient... Wenn ich nen bitset haben will, dann nehme ich auch eins.<br />
Wenn man den &quot;Tag des vector&lt;bool&gt;&quot; einführt, könnte man zudem auf die Problematik hinweisen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360589</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360589</guid><dc:creator><![CDATA[decimad]]></dc:creator><pubDate>Tue, 15 Oct 2013 21:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Wed, 16 Oct 2013 09:20:32 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p>Und der überladene Operator gibt dann wieder eine Referenz auf <code>bool</code> zurück? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
</blockquote>
<p>du hast mehr oder weniger verstandn warum ich geschrieben hab: &quot;nicht so knorke&quot; aka: &quot;Löst das Problem nicht&quot; aka &quot;verschiebt das Problem nur ein Ebene höher&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360646</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Wed, 16 Oct 2013 09:20:32 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Wed, 16 Oct 2013 13:37:38 GMT]]></title><description><![CDATA[<p>mal nicht so unkreativ, die Rede war von <strong>austauschen</strong></p>
<pre><code>template&lt;class T&gt;
class MyClass{
    typedef typename std::conditional&lt;std::is_same&lt;T,bool&gt;::value, char, T&gt;::type value_type;
//...
    value_type&amp; operator[](std::size_t i){
        return elements[i];
    }
private:
    std::vector&lt;value_type&gt; elements;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2360719</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360719</guid><dc:creator><![CDATA[ScottZhang]]></dc:creator><pubDate>Wed, 16 Oct 2013 13:37:38 GMT</pubDate></item><item><title><![CDATA[Reply to ‘class std::vector&amp;lt;bool&amp;gt;’ has no member named ‘emplace_back’ on Wed, 16 Oct 2013 13:59:27 GMT]]></title><description><![CDATA[<p>otze schrieb:</p>
<blockquote>
<p>aka &quot;verschiebt das Problem nur ein Ebene höher&quot;</p>
</blockquote>
<p>Jetzt muss halt der Benutzer von MyClass damit zurechtkommen, dass er keine bool&amp; kriegt...</p>
<p>//edit nene, wenn typumleitung, dann auf einen anderen Container.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2360724</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2360724</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Wed, 16 Oct 2013 13:59:27 GMT</pubDate></item></channel></rss>