forked from boostorg/throw_exception
Merging changes from trunk.
[SVN r58421]
This commit is contained in:
committed by
Peter Dimov
parent
bee54c1aee
commit
fed2b48aa9
@ -6,9 +6,7 @@
|
||||
#ifndef UUID_61531AB0680611DEADD5846855D89593
|
||||
#define UUID_61531AB0680611DEADD5846855D89593
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#if defined(_MSC_VER)
|
||||
#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)
|
||||
#elif defined(__GNUC__)
|
||||
#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))
|
||||
|
@ -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
|
||||
@ -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>
|
||||
@ -151,7 +166,6 @@ boost
|
||||
|
||||
protected:
|
||||
|
||||
virtual
|
||||
~error_info_container() throw()
|
||||
{
|
||||
}
|
||||
@ -202,34 +216,19 @@ 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 &, char 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
|
||||
@ -393,4 +416,7 @@ boost
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/exception/detail/attribute_noreturn.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <exception>
|
||||
|
||||
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
class my_exception: public std::exception { };
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user