diff options
| author | Remko Tronçon <git@el-tramo.be> | 2010-04-11 18:19:17 (GMT) | 
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2010-04-11 19:20:07 (GMT) | 
| commit | 857e44c156a1dbefcb49bb5792c4384cebd8762a (patch) | |
| tree | 11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/exception/exception.hpp | |
| parent | 77d4eb7588e113beaa03f3347523b26adefdeb06 (diff) | |
| download | swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2  | |
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/exception/exception.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/exception/exception.hpp | 96 | 
1 files changed, 61 insertions, 35 deletions
diff --git a/3rdParty/Boost/src/boost/exception/exception.hpp b/3rdParty/Boost/src/boost/exception/exception.hpp index 6df93ac..79b2739 100644 --- a/3rdParty/Boost/src/boost/exception/exception.hpp +++ b/3rdParty/Boost/src/boost/exception/exception.hpp @@ -5,6 +5,12 @@  #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593  #define UUID_274DA366004E11DCB1DDFE2E56D89593 +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif  namespace  boost @@ -80,13 +86,13 @@ boost      template <class Tag,class T>      class error_info; -    typedef error_info<struct tag_throw_function,char const *> throw_function; -    typedef error_info<struct tag_throw_file,char const *> throw_file; -    typedef error_info<struct tag_throw_line,int> throw_line; +    typedef error_info<struct throw_function_,char const *> throw_function; +    typedef error_info<struct throw_file_,char const *> throw_file; +    typedef error_info<struct throw_line_,int> throw_line;      template <>      class -    error_info<tag_throw_function,char const *> +    error_info<throw_function_,char const *>          {          public:          typedef char const * value_type; @@ -100,7 +106,7 @@ boost      template <>      class -    error_info<tag_throw_file,char const *> +    error_info<throw_file_,char const *>          {          public:          typedef char const * value_type; @@ -114,7 +120,7 @@ boost      template <>      class -    error_info<tag_throw_line,int> +    error_info<throw_line_,int>          {          public:          typedef int value_type; @@ -129,6 +135,15 @@ boost      template <class E,class Tag,class T>      E const & operator<<( E const &, error_info<Tag,T> const & ); +    template <class E> +    E const & operator<<( E const &, throw_function const & ); + +    template <class E> +    E const & operator<<( E const &, throw_file const & ); + +    template <class E> +    E const & operator<<( E const &, throw_line const & ); +      class exception;      template <class> @@ -143,15 +158,14 @@ boost          struct          error_info_container              { -            virtual char const * diagnostic_information() const = 0; -            virtual shared_ptr<error_info_base const> get( type_info_ const & ) const = 0; -            virtual void set( shared_ptr<error_info_base const> const &, type_info_ const & ) = 0; +            virtual char const * diagnostic_information( char const * ) const = 0; +            virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0; +            virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;              virtual void add_ref() const = 0;              virtual void release() const = 0;              protected: -            virtual              ~error_info_container() throw()                  {                  } @@ -169,7 +183,7 @@ boost          template <>          struct get_info<throw_line>; -        char const * get_diagnostic_information( exception const & ); +        char const * get_diagnostic_information( exception const &, char const * );          }      class @@ -202,36 +216,21 @@ boost  #endif              ; +#if defined(__MWERKS__) && __MWERKS__<=0x3207 +        public: +#else          private:          template <class E> -        friend -        E const & -        operator<<( E const & x, throw_function const & y ) -            { -            x.throw_function_=y.v_; -            return x; -            } +        friend E const & operator<<( E const &, throw_function const & );          template <class E> -        friend -        E const & -        operator<<( E const & x, throw_file const & y ) -            { -            x.throw_file_=y.v_; -            return x; -            } +        friend E const & operator<<( E const &, throw_file const & );          template <class E> -        friend -        E const & -        operator<<( E const & x, throw_line const & y ) -            { -            x.throw_line_=y.v_; -            return x; -            } +        friend E const & operator<<( E const &, throw_line const & ); -        friend char const * exception_detail::get_diagnostic_information( exception const & ); +        friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );          template <class E,class Tag,class T>          friend E const & operator<<( E const &, error_info<Tag,T> const & ); @@ -241,7 +240,7 @@ boost          friend struct exception_detail::get_info<throw_function>;          friend struct exception_detail::get_info<throw_file>;          friend struct exception_detail::get_info<throw_line>; - +#endif          mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;          mutable char const * throw_function_;          mutable char const * throw_file_; @@ -254,6 +253,30 @@ boost          {          } +    template <class E> +    E const & +    operator<<( E const & x, throw_function const & y ) +        { +        x.throw_function_=y.v_; +        return x; +        } + +    template <class E> +    E const & +    operator<<( E const & x, throw_file const & y ) +        { +        x.throw_file_=y.v_; +        return x; +        } + +    template <class E> +    E const & +    operator<<( E const & x, throw_line const & y ) +        { +        x.throw_line_=y.v_; +        return x; +        } +      ////////////////////////////////////////////////////////////////////////      namespace @@ -303,7 +326,7 @@ boost          struct          enable_error_info_return_type              { -            typedef typename enable_error_info_helper<T,sizeof(dispatch((T*)0))>::type type; +            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch((T*)0))>::type type;              };          } @@ -393,4 +416,7 @@ boost          }      } +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif  #endif  | 
 Swift