Boost C++ Libraries: Ticket #7008: boost/serialization/detail/get_data.hpp leaks STD macro https://svn.boost.org/trac10/ticket/7008 <p> The header boost/serialization/detail/get_data.hpp defines the macro STD for local use in the header. However, it does not un-define the macro at the end of the header, causing a commonly used name to be leaked as a macro for anything included after this header. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7008 Trac 1.4.3 Robert Ramey Thu, 21 Jun 2012 20:12:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7008#comment:1 https://svn.boost.org/trac10/ticket/7008#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> OK - fixed on my machine - will eventually arrive at release </p> Ticket dave.lowell@… Wed, 12 Aug 2015 20:08:32 GMT status changed; cc set; resolution deleted https://svn.boost.org/trac10/ticket/7008#comment:2 https://svn.boost.org/trac10/ticket/7008#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">dave.lowell@…</span> added </li> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> The definition of STD in get_data.hpp is unconditional. What it's defined to depends on whether STLport is being used, but it's always defined to something. </p> <p> However, the undef that's been added is conditional - STD is only undefined when STLport is being used. If it's not used, then it looks like the definition still leaks. </p> Ticket dave.lowell@… Wed, 12 Aug 2015 20:10:49 GMT attachment set https://svn.boost.org/trac10/ticket/7008 https://svn.boost.org/trac10/ticket/7008 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">get_data.hpp</span> </li> </ul> <p> patched version of get_data.hpp with unconditional undef </p> Ticket Robert Ramey Mon, 28 Sep 2015 05:49:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7008#comment:3 https://svn.boost.org/trac10/ticket/7008#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Sorry I'm not seeing this is the current code which looks like: </p> <pre class="wiki">#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #define STD _STLP_STD #else #define STD std #endif ... #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #undef STD #endif </pre> Ticket jonathan.jones@… Wed, 30 Sep 2015 14:11:02 GMT <link>https://svn.boost.org/trac10/ticket/7008#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7008#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7008#comment:3" title="Comment 3">ramey</a>: </p> <blockquote class="citation"> <p> Sorry I'm not seeing this is the current code which looks like: </p> <pre class="wiki">#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #define STD _STLP_STD #else #define STD std #endif ... #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #undef STD #endif </pre></blockquote> <p> What happens if neither <span class="underline">SGI_STL_PORT nor _STLPORT_VERSION are defined? </span></p> <p> The first block #defines STD to "std". The second block does not #undefine STD, hence the macro definition for STD leaks. </p> </description> <category>Ticket</category> </item> <item> <author>jonathan.jones@…</author> <pubDate>Wed, 30 Sep 2015 14:11:58 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/7008#comment:5 https://svn.boost.org/trac10/ticket/7008#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> Ticket Robert Ramey Wed, 30 Sep 2015 15:36:44 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7008#comment:6 https://svn.boost.org/trac10/ticket/7008#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> OK - I don't know what I was thinking. </p> <p> Fixed again now </p> Ticket