Boost C++ Libraries: Ticket #9482: MSVC macros not undefined in boost/move/detail/config_end.hpp https://svn.boost.org/trac10/ticket/9482 <p> Boost.Move defines several macros in boost/move/detail/config_begin.hpp to silence MSVC warnings. The corresponding cleanup code in boost/move/detail/config_end.hpp is incorrect and fails to properly undefine these macros: </p> <pre class="wiki">#if defined BOOST_MSVC #pragma warning (pop) #ifdef BOOST_MOVE_DETAIL_CRT_SECURE_NO_DEPRECATE #undef BOOST_MOVE_DETAIL_CRT_SECURE_NO_DEPRECATE #undef _CRT_SECURE_NO_DEPRECATE #endif #ifndef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef _SCL_SECURE_NO_WARNINGS #endif #endif </pre><p> A correct implementation would be </p> <pre class="wiki">#if defined BOOST_MSVC #pragma warning (pop) #ifdef BOOST_MOVE_CRT_SECURE_NO_DEPRECATE #undef BOOST_MOVE_CRT_SECURE_NO_DEPRECATE #undef _CRT_SECURE_NO_DEPRECATE #endif #ifdef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef _SCL_SECURE_NO_WARNINGS #endif #endif </pre><p> This is quite problematic as the current version either undefines a previously defined macro, or leaks the macro definition, both of which lead to surprising behavior. </p> <p> A patch against current trunk is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9482 Trac 1.4.3 Matthias R Tue, 10 Dec 2013 13:12:47 GMT attachment set https://svn.boost.org/trac10/ticket/9482 https://svn.boost.org/trac10/ticket/9482 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_move_detail_config_end.patch</span> </li> </ul> Ticket Ion Gaztañaga Sun, 23 Feb 2014 20:35:00 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9482#comment:1 https://svn.boost.org/trac10/ticket/9482#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Sorry for the delay and thanks for the patch. Fixed in commit </p> <p> SHA-1: 688955ab9b1e022a49c027a8fc6f56ada3ff8e0f </p> Ticket