Boost C++ Libraries: Ticket #7995: compile error in transform_width.hpp when the min macro is defined https://svn.boost.org/trac10/ticket/7995 <p> When trying to compile some code that uses base64_from_binary in VC9 using 1.53, i got the errors: </p> <pre class="wiki">boost\archive\iterators\transform_width.hpp(151) : error C2589: '(' : illegal token on right side of '::' boost\archive\iterators\transform_width.hpp(151) : error C2059: syntax error : '::' </pre><p> Which seems to be down to the 'min' macro being defined. </p> <p> Changing line 151 to something like </p> <pre class="wiki">unsigned int i = (std::min)(missing_bits, m_remaining_bits); </pre><p> allows it to compile. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7995 Trac 1.4.3 Robert Ramey Wed, 06 Feb 2013 19:17:45 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7995#comment:1 https://svn.boost.org/trac10/ticket/7995#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> Which compiler still defines "min" as a macro? </p> <p> In any case, your adjustment seems harmless, so I'll roll it in </p> Ticket Richard Webb Fri, 08 Feb 2013 12:01:17 GMT <link>https://svn.boost.org/trac10/ticket/7995#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7995#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7995#comment:1" title="Comment 1">ramey</a>: </p> <blockquote class="citation"> <p> Which compiler still defines "min" as a macro? </p> </blockquote> <p> Visual Studio 2008, when including the windows headers without defining NOMINMAX first (I normally do, but in this case the code is using WTL, and that breaks if the macro isn't defined). </p> <p> Thanks for fixing it in any case. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 13 Aug 2013 16:16:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7995#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7995#comment:3</guid> <description> <p> I have this problem too. boost 1.54 visual studio 2010 WTL 7.5 </p> </description> <category>Ticket</category> </item> <item> <author>thomas.braun@…</author> <pubDate>Wed, 13 Nov 2013 20:45:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7995#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7995#comment:4</guid> <description> <p> Please reopen this bug as this bug perists with boost 1.55 and Visual Studio 8 2005. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 26 Mar 2017 09:56:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7995#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7995#comment:5</guid> <description> <p> Bug persists with boost 1.55 and Visual Studio 2013. </p> </description> <category>Ticket</category> </item> </channel> </rss>