Le 13/10/13 22:06, Stephen Kelly a écrit :
On 10/13/2013 09:52 PM, Peter Dimov wrote:
Stephen Kelly wrote:
My changes amount to removal of definitions of some macros in boost/config, followed by removal of newly-dead code. That's not quite true, Stephen.
Here are a few examples of changes that do not remove any dead code:
-#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) +#if ( defined(__GNUC__) && (__GNUC__ < 3) )
--
-#elif defined( _MSC_VER ) && _MSC_VER >= 1310 +#elif defined( _MSC_VER )
--
-#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) +#if defined(_MSC_VER) && ( defined(_M_IX86) || defined(_M_X64) )
--
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) ... -#endif
--
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE ) +#if !defined( BOOST_NO_SFINAE )
I consider all of the above to be dead code removal. It's ok that you don't see it the same way.
Now, you'd say that in some of these cases, this is just the first step of a process that will eventually result in the removal of dead code. Maybe so. But in the meantime, we're left with an #ifdef that makes much less sense than the original, which was generally self-documenting. We also have a revision control system.
When I see
#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) )
I know that the following is a workaround for the lack of templated iostreams, and that for some (admittedly lost in time) reason, g++ 2.x lacks templated iostreams but does not define the config macro. Without the first portion, this information is no longer present. ... in the source code. It is still in the revision control system, which has logs which are file-specific and a 'blame' feature which is line-specific.
Few people would object to actual removal of dead code sections such as
#if defined(THIS) || defined(THAT)
...
#endif
when we know that neither THIS nor THAT will ever be defined (there are some rare exceptions to that). Fiddling with the ifdef conditions is another story. I just don't agree with your mail.
Steve, you don't agree with some of the authors/maintainer of the libraries you are modifying. Take in account that, at the end, it is up to the authors to maintain their code. I see your modifications quite intrusive and I would prefer that you fill Trac tickets for each library as Andrey suggested. This is the way we are working today and changing it merits some previous discussion. Please don't commit anything for Boost.Ratio/Chrono/Thread. Best, Vicente