diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
commit | bb4dd8289b351fae6b55e303f189127a394a1edd (patch) | |
tree | 77c9c35a31b1459dd7988c2448e797d142530c41 /boost/exception | |
parent | 1a78a62555be32868418fe52f8e330c9d0f95d5a (diff) | |
download | boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.gz boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.bz2 boost-bb4dd8289b351fae6b55e303f189127a394a1edd.zip |
Imported Upstream version 1.51.0upstream/1.51.0
Diffstat (limited to 'boost/exception')
-rw-r--r-- | boost/exception/detail/attribute_noreturn.hpp | 2 | ||||
-rw-r--r-- | boost/exception/detail/error_info_impl.hpp | 1 | ||||
-rw-r--r-- | boost/exception/detail/exception_ptr.hpp | 9 | ||||
-rw-r--r-- | boost/exception/error_info.hpp | 3 | ||||
-rw-r--r-- | boost/exception/exception.hpp | 31 | ||||
-rw-r--r-- | boost/exception/info.hpp | 2 | ||||
-rw-r--r-- | boost/exception/info_tuple.hpp | 24 |
7 files changed, 66 insertions, 6 deletions
diff --git a/boost/exception/detail/attribute_noreturn.hpp b/boost/exception/detail/attribute_noreturn.hpp index f6a0b5903e..ae9f031efe 100644 --- a/boost/exception/detail/attribute_noreturn.hpp +++ b/boost/exception/detail/attribute_noreturn.hpp @@ -9,7 +9,7 @@ #if defined(_MSC_VER) #define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) #elif defined(__GNUC__) -#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn)) +#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) #else #define BOOST_ATTRIBUTE_NORETURN #endif diff --git a/boost/exception/detail/error_info_impl.hpp b/boost/exception/detail/error_info_impl.hpp index 883d313a98..a8d1aa79dd 100644 --- a/boost/exception/detail/error_info_impl.hpp +++ b/boost/exception/detail/error_info_impl.hpp @@ -30,6 +30,7 @@ boost protected: + virtual ~error_info_base() throw() { } diff --git a/boost/exception/detail/exception_ptr.hpp b/boost/exception/detail/exception_ptr.hpp index b6ccf7e18c..5e5a2679b8 100644 --- a/boost/exception/detail/exception_ptr.hpp +++ b/boost/exception/detail/exception_ptr.hpp @@ -25,7 +25,7 @@ #include <stdexcept> #include <new> #include <ios> -#include <cstdlib> +#include <stdlib.h> namespace boost @@ -457,7 +457,12 @@ boost BOOST_ASSERT(p); p.ptr_->rethrow(); BOOST_ASSERT(0); - std::abort(); + #if defined(UNDER_CE) + // some CE platforms don't define ::abort() + exit(-1); + #else + abort(); + #endif } inline diff --git a/boost/exception/error_info.hpp b/boost/exception/error_info.hpp index 2e6832a338..03b3da8e31 100644 --- a/boost/exception/error_info.hpp +++ b/boost/exception/error_info.hpp @@ -3,4 +3,7 @@ //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) +#ifndef UUID_EE7ECCA0433B11E1923E37064924019B +#define UUID_EE7ECCA0433B11E1923E37064924019B namespace boost { template <class Tag,class T> class error_info; } +#endif diff --git a/boost/exception/exception.hpp b/boost/exception/exception.hpp index 9cdfd5c6e8..42d2787128 100644 --- a/boost/exception/exception.hpp +++ b/boost/exception/exception.hpp @@ -310,6 +310,11 @@ boost namespace exception_detail { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif template <class T> struct error_info_injector: @@ -326,6 +331,11 @@ boost { } }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif struct large_size { char c[256]; }; large_size dispatch_boost_exception( exception const * ); @@ -373,6 +383,11 @@ boost namespace exception_detail { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif class clone_base { @@ -386,6 +401,11 @@ boost { } }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif inline void @@ -410,8 +430,15 @@ boost class clone_impl: public T, - public clone_base + public virtual clone_base { + struct clone_tag { }; + clone_impl( clone_impl const & x, clone_tag ): + T(x) + { + copy_boost_exception(this,&x); + } + public: explicit @@ -430,7 +457,7 @@ boost clone_base const * clone() const { - return new clone_impl(*this); + return new clone_impl(*this,clone_tag()); } void diff --git a/boost/exception/info.hpp b/boost/exception/info.hpp index 5530746223..7b56076d7b 100644 --- a/boost/exception/info.hpp +++ b/boost/exception/info.hpp @@ -97,7 +97,7 @@ boost { shared_ptr<error_info_base> const & p = i->second; #ifndef BOOST_NO_RTTI - BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ ); + BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ ); #endif return p; } diff --git a/boost/exception/info_tuple.hpp b/boost/exception/info_tuple.hpp index 34afe421b1..bf1be15da2 100644 --- a/boost/exception/info_tuple.hpp +++ b/boost/exception/info_tuple.hpp @@ -19,6 +19,30 @@ namespace boost { template < + class E > + inline + E const & + operator<<( + E const & x, + tuple< > const & v ) + { + return x; + } + + template < + class E, + class Tag1,class T1 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info<Tag1,T1> > const & v ) + { + return x << v.template get<0>(); + } + + template < class E, class Tag1,class T1, class Tag2,class T2 > |