|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2005-07-21 07:59:11
Bugs item #1242266, was opened at 2005-07-21 05:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1242266&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: type_traits
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: John Maddock (johnmaddock)
Summary: Move comments in BOOST_STATIC_CONSTANT
Initial Comment:
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<
::boost::is_arithmetic<T>::value
, ::boost::is_reference<T>::value
, is_class_or_union<T>::value
// However, not doing this on non-conforming
compilers prevents
// a dependency recursion.
>::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< ::boost::is_arithmetic<T>::v
alue , ::boost::is_reference<T>::value ,
is_class_or_union<T>::value >::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_at_tiobe.com.
Regards,
Paul Jansen
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1242266&group_id=7586
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk