[modernization][skelly] Surprising changes

I was going through recent Boost.Spirit changes and I was surprised to
see this code:
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \
|| (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \
|| (defined(__GNUC__) && (__GNUC__ < 3)) \
|| (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
# error "Compiler not supported. See note in

On 10/22/2013 02:29 AM, Agustín K-ballo Bergé wrote:
I was going through recent Boost.Spirit changes and I was surprised to see this code:
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \ || (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \ || (defined(__GNUC__) && (__GNUC__ < 3)) \ || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) # error "Compiler not supported. See note in
" #else // Pass... Compiler supported. #endif modified into this code:
#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) # error "Compiler not supported. See note in
" #else // Pass... Compiler supported. #endif The whole point of the check is to detect unsupported compilers. It seems the modernization changes do not take into account the context in which they are done.
I made that change deliberately. The checks I removed are redundant. Earlier in that file, boost/config.hpp is included, so if an unsupported compiler is used, it will fail already. Thanks, Steve.
participants (2)
-
Agustín K-ballo Bergé
-
Stephen Kelly