<?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[Blödes Warning bei std::copy]]></title><description><![CDATA[<p>Ich benutze in meinem Code copy:</p>
<pre><code class="language-cpp">copy(points, points+8, target);
</code></pre>
<p>(points ist ein Array: Vector3 points[8]). Leider gibt das dieses Warning (VS2010):</p>
<blockquote>
<p>'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'<br />
1&gt; d:\microsoft visual studio 10.0\vc\include\xutility(2212) : see declaration of 'std::_Copy_impl'</p>
</blockquote>
<p>Was soll dieses Warning? Wie krieg ich das weg?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/290307/blödes-warning-bei-std-copy</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 16:37:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/290307.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Jul 2011 20:21:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 20:21:39 GMT]]></title><description><![CDATA[<p>Ich benutze in meinem Code copy:</p>
<pre><code class="language-cpp">copy(points, points+8, target);
</code></pre>
<p>(points ist ein Array: Vector3 points[8]). Leider gibt das dieses Warning (VS2010):</p>
<blockquote>
<p>'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'<br />
1&gt; d:\microsoft visual studio 10.0\vc\include\xutility(2212) : see declaration of 'std::_Copy_impl'</p>
</blockquote>
<p>Was soll dieses Warning? Wie krieg ich das weg?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096973</guid><dc:creator><![CDATA[warnerBros]]></dc:creator><pubDate>Sat, 23 Jul 2011 20:21:39 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 20:28:23 GMT]]></title><description><![CDATA[<p>Nutze STD-Container...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096978</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Sat, 23 Jul 2011 20:28:23 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 20:30:06 GMT]]></title><description><![CDATA[<p>Erstens: Was ist eigentlich &quot;target&quot;? Und bist du sicher, daß dort genügend Platz für die Kopie ist?<br />
Zweitens: Die Fehlermeldung beschreibt doch auch, wie du sie abschalten kannst:</p>
<blockquote>
<p>To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.</p>
</blockquote>
<p>Drittens: Ich denke, jetzt wäre es eine gute Idee, über STL-Container (std::vector&lt;&gt;, std::tr1::array&lt;&gt;) nachzudenken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096982</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 23 Jul 2011 20:30:06 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 20:45:35 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>Erstens: Was ist eigentlich &quot;target&quot;? Und bist du sicher, daß dort genügend Platz für die Kopie ist?</p>
</blockquote>
<p>target ist ebenfalls ein Vector3 Array:<br />
Vector3 points[8];</p>
<p>Die Arrays haben exakt die selbe Größe. Was soll dieses doofe Warning? Is doch total paranoid.</p>
<p>CStoll schrieb:</p>
<blockquote>
<p>Zweitens: Die Fehlermeldung beschreibt doch auch, wie du sie abschalten kannst:</p>
<blockquote>
<p>To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.</p>
</blockquote>
<p>Drittens: Ich denke,</p>
</blockquote>
<p>Ja klar. Hatte nur die Befürchtung, dass ich dann vielleicht andere sinnvolle Warnings unterdrücke. Einen vector oder sowas nehm ich nicht, da der Overhead unerwünscht ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096992</guid><dc:creator><![CDATA[warnerBros]]></dc:creator><pubDate>Sat, 23 Jul 2011 20:45:35 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 20:51:30 GMT]]></title><description><![CDATA[<p>warnerBros schrieb:</p>
<blockquote>
<p>Einen vector oder sowas nehm ich nicht, da der Overhead unerwünscht ist.</p>
</blockquote>
<p>Dann nimm <code>std::tr1::array</code> und wenn du Technical Review 1 nicht hast, dann <code>boost::array</code> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2096996</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2096996</guid><dc:creator><![CDATA[EOutOfResources]]></dc:creator><pubDate>Sat, 23 Jul 2011 20:51:30 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:01:29 GMT]]></title><description><![CDATA[<p>Was für einen technischen Overhead hat vector denn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2097014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097014</guid><dc:creator><![CDATA[Eisflamme]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:01:29 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:03:12 GMT]]></title><description><![CDATA[<p>Eisflamme schrieb:</p>
<blockquote>
<p>Was für einen technischen Overhead hat vector denn?</p>
</blockquote>
<p>Heap Allokationen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2097015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097015</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:03:12 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:21:40 GMT]]></title><description><![CDATA[<p>Achso, in Ordnung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2097020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097020</guid><dc:creator><![CDATA[Eisflamme]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:23:08 GMT]]></title><description><![CDATA[<p>Ich würde auch das Klassentemplate <code>std::array</code> nehmen. Ist im Release-Modus genauso schnell wie ein rohes Array, aber hat im Debug-Modus nützliche Index- und Iteratorchecks. Ausserdem hat die Klasse im Gegensatz zu Arrays Kopiersemantik, keine implizite Konvertierung zu Zeigern und ein STL-Interface (z.B. <code>size()</code> -Methode). Äusserst praktisch. Im Prinzip spricht in modernem C++ nichts dafür, noch rohe Arrays zu verwenden.</p>
<p>Hm, ist nun mindestens das vierte Mal innerhalb kurzer Zeit, wo ich diese Empfehlung ausspreche... <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/2097021</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097021</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:23:08 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:43:03 GMT]]></title><description><![CDATA[<p>Ok, ich habe mir gerade std::array angeschaut und finde das Ding eigentlich ganz angenehm. Bin jetzt umgestiegen auf std::array^^</p>
<p>Eine Frage dazu: Was ist die beste Methode um ein std::array in einen std::vector zu kopieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2097027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097027</guid><dc:creator><![CDATA[warnerBros]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:43:03 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 22:50:34 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::vector&lt;T&gt; v(array.begin(), array.end());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2097031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097031</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Sat, 23 Jul 2011 22:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Warning bei std::copy on Sat, 23 Jul 2011 23:47:28 GMT]]></title><description><![CDATA[<p>Oder falls der <code>std::vector</code> schon besteht, kannst du <code>assign()</code> verwenden. Oder <code>insert()</code> , falls vorherige Elemente erhalten bleiben sollen.</p>
<p><a href="http://www.cplusplus.com/reference/stl/vector/" rel="nofollow">Dokumentation zu <code>std::vector</code> </a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2097037</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2097037</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Sat, 23 Jul 2011 23:47:28 GMT</pubDate></item></channel></rss>