Ticket #4119: lexicalCastNoExceptionsWorkaround.patch

File lexicalCastNoExceptionsWorkaround.patch, 701 bytes (added by Arkadiy Shapkin <arkadiy_s@…>, 13 years ago)
  • lexical_cast.hpp

     
    5555namespace boost
    5656{
    5757    // exception used to indicate runtime lexical_cast failure
    58     class bad_lexical_cast : public std::bad_cast
     58        class bad_lexical_cast :
     59// workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0
     60#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
     61                public std::exception
     62#else
     63                public std::bad_cast
     64#endif
    5965
    6066#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
    6167        // under bcc32 5.5.1 bad_cast doesn't derive from exception