diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/polymorphic_cast.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/polymorphic_cast.hpp')
-rw-r--r-- | boost/polymorphic_cast.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/boost/polymorphic_cast.hpp b/boost/polymorphic_cast.hpp index 03013c718e..70afa6be2e 100644 --- a/boost/polymorphic_cast.hpp +++ b/boost/polymorphic_cast.hpp @@ -1,6 +1,7 @@ // boost polymorphic_cast.hpp header file ----------------------------------------------// // (C) Copyright Kevlin Henney and Dave Abrahams 1999. +// (C) Copyright Boris Rasin 2014. // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,6 +9,9 @@ // See http://www.boost.org/libs/conversion for Documentation. // Revision History +// 10 Nov 14 polymorphic_pointer_downcast moved to a separate header, +// minor improvements to stisfy latest Boost coding style +// 08 Nov 14 Add polymorphic_pointer_downcast (Boris Rasin) // 09 Jun 14 "cast.hpp" was renamed to "polymorphic_cast.hpp" and // inclusion of numeric_cast was removed (Antony Polukhin) // 23 Jun 05 numeric_cast removed and redirected to the new verion (Fernando Cacciola) @@ -47,8 +51,13 @@ # include <boost/config.hpp> # include <boost/assert.hpp> +# include <boost/throw_exception.hpp> # include <typeinfo> +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + namespace boost { // See the documentation for descriptions of how to choose between @@ -64,7 +73,7 @@ namespace boost inline Target polymorphic_cast(Source* x) { Target tmp = dynamic_cast<Target>(x); - if ( tmp == 0 ) throw std::bad_cast(); + if ( tmp == 0 ) boost::throw_exception( std::bad_cast() ); return tmp; } |