How disable SCL SECURE WARNING just for a function call and not globaly?
<p>According to MSDN about <a href="https://msdn.microsoft.com/en-us/library/aa985974.aspx" rel="nofollow noreferrer">_SCL_SECURE_NO_WARNINGS</a>:</p>
<blockquote>
<p>Calling any one of the potentially unsafe methods in the Standard C++ Library will result in <a href="https://msdn.microsoft.com/en-us/library/ttcz0bys.aspx" rel="nofollow noreferrer">Compiler Warning (level 3) C4996</a>. To disable this warning, define the macro _SCL_SECURE_NO_WARNINGS in your code:</p>
<pre><code>#define _SCL_SECURE_NO_WARNINGS
</code></pre>
</blockquote>
<p>it is also posible to disable the warning like this:</p>
<pre><code>#pragma warning(disable:4996)
</code></pre>
<p><strong>but ...  by using any of this approaches you can disable the warning globaly, I want to doit localy, for instance:</strong></p>
<pre><code>#pragma warning(disable:4996)
some_string.copy(str, some_string.length());
// #pragma warning(enable:4996)   There is something outhere like this?
</code></pre>
<p>There is something like above code outhere?</p>