Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81847 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2012-12-11 00:33:48


Author: ramey
Date: 2012-12-11 00:33:45 EST (Tue, 11 Dec 2012)
New Revision: 81847
URL: http://svn.boost.org/trac/boost/changeset/81847

Log:
corrected throw exception in smart cast
Text files modified:
   trunk/boost/serialization/smart_cast.hpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/serialization/smart_cast.hpp
==============================================================================
--- trunk/boost/serialization/smart_cast.hpp (original)
+++ trunk/boost/serialization/smart_cast.hpp 2012-12-11 00:33:45 EST (Tue, 11 Dec 2012)
@@ -56,6 +56,8 @@
 #include <boost/mpl/not.hpp>
 #include <boost/mpl/identity.hpp>
 
+#include <boost/serialization/throw_exception.hpp>
+
 namespace boost {
 namespace serialization {
 namespace smart_cast_impl {
@@ -159,7 +161,7 @@
                 static T cast(U * u){
                     T tmp = dynamic_cast< T >(u);
                     #ifndef NDEBUG
- if ( tmp == 0 ) throw std::bad_cast();
+ if ( tmp == 0 ) throw_exception(std::bad_cast());
                     #endif
                     return tmp;
                 }
@@ -201,7 +203,7 @@
             static T cast(U * u){
                 T tmp = dynamic_cast< T >(u);
                 #ifndef NDEBUG
- if ( tmp == 0 ) throw std::bad_cast();
+ if ( tmp == 0 ) throw_exception(std::bad_cast());
                 #endif
                 return tmp;
             }


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