Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62529 - trunk/boost
From: Alexander.Nasonov_at_[hidden]
Date: 2010-06-07 18:58:43


Author: nasonov
Date: 2010-06-07 18:58:42 EDT (Mon, 07 Jun 2010)
New Revision: 62529
URL: http://svn.boost.org/trac/boost/changeset/62529

Log:
Apply the patch from #4119. Fixes #4119.
Text files modified:
   trunk/boost/lexical_cast.hpp | 8 +++++++-
   1 files changed, 7 insertions(+), 1 deletions(-)

Modified: trunk/boost/lexical_cast.hpp
==============================================================================
--- trunk/boost/lexical_cast.hpp (original)
+++ trunk/boost/lexical_cast.hpp 2010-06-07 18:58:42 EDT (Mon, 07 Jun 2010)
@@ -55,7 +55,13 @@
 namespace boost
 {
     // exception used to indicate runtime lexical_cast failure
- class bad_lexical_cast : public std::bad_cast
+ class bad_lexical_cast :
+ // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0
+#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ public std::exception
+#else
+ public std::bad_cast
+#endif
 
 #if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
         // under bcc32 5.5.1 bad_cast doesn't derive from exception


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk