Boost C++ Libraries: Ticket #444: Move comments in BOOST_STATIC_CONSTANT https://svn.boost.org/trac10/ticket/444 <pre class="wiki">There appears to be some comments in one of the macro function calls of BOOST_STATIC_CONSTANT (line 124 of "type_traits/is_enum.hpp): BOOST_STATIC_CONSTANT(bool, selector = (::boost::type_traits::ice_or&lt; ::boost::is_arithmetic&lt;T&gt;::value , ::boost::is_reference&lt;T&gt;::value , is_class_or_union&lt;T&gt;::value // However, not doing this on non-conforming compilers prevents // a dependency recursion. &gt;::value)); This is not incorrect but it expands to incorrect code in case you run the Visual Studio.NET 2002/2003/2005 C++ compiler with the compiler options "/E /C". The result after preprocessing is: // However, not doing this on non-conforming compilers prevents// a dependency recursion.enum { selector = (::boost::type_traits::ice_or&lt; ::boost::is_arithmetic&lt;T&gt;::v alue , ::boost::is_reference&lt;T&gt;::value , is_class_or_union&lt;T&gt;::value &gt;::value) }; which obviously hides the definition of "selector"! Since we are performing code checking on the preprocessed file our code checker is unable to check C++ files that contain "is_enum.hpp". This is clearly a bug in the Visual Studio C++ compiler, but my hopes are that the comments can be moved in Boost, e.g. towards the start of the macro function call or the end. This will solve the problem of being able to code check this file. It might solve problems with other preprocessors as well. In case you need further details, contact me at Paul.Jansen@tiobe.com. Regards, Paul Jansen </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/444 Trac 1.4.3 david_abrahams Fri, 22 Jul 2005 16:16:13 GMT status changed https://svn.boost.org/trac10/ticket/444#comment:1 https://svn.boost.org/trac10/ticket/444#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket