mirror of
https://github.com/boostorg/exception.git
synced 2025-07-24 09:37:25 +02:00
Simplified type_info support due to improvements in boost/detail/sp_typeinfo.hpp. A few tweaks to better deal with warnings.
[SVN r58132]
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593
|
#ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593
|
||||||
#define UUID_316FDA946C0D11DEA9CBAE5255D89593
|
#define UUID_316FDA946C0D11DEA9CBAE5255D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/diagnostic_information.hpp>
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
#include <boost/exception/error_info.hpp>
|
#include <boost/exception/error_info.hpp>
|
||||||
@ -28,4 +30,7 @@
|
|||||||
#include <boost/exception_ptr.hpp>
|
#include <boost/exception_ptr.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_7E83C166200811DE885E826156D89593
|
#ifndef UUID_7E83C166200811DE885E826156D89593
|
||||||
#define UUID_7E83C166200811DE885E826156D89593
|
#define UUID_7E83C166200811DE885E826156D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
@ -35,4 +37,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_CE6983AC753411DDA764247956D89593
|
#ifndef UUID_CE6983AC753411DDA764247956D89593
|
||||||
#define UUID_CE6983AC753411DDA764247956D89593
|
#define UUID_CE6983AC753411DDA764247956D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -34,10 +36,6 @@ boost
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable:4512) //assignment operator could not be generated
|
|
||||||
#endif
|
|
||||||
template <class Tag,class T>
|
template <class Tag,class T>
|
||||||
class
|
class
|
||||||
error_info:
|
error_info:
|
||||||
@ -69,9 +67,9 @@ boost
|
|||||||
|
|
||||||
value_type value_;
|
value_type value_;
|
||||||
};
|
};
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_618474C2DE1511DEB74A388C56D89593
|
#ifndef UUID_618474C2DE1511DEB74A388C56D89593
|
||||||
#define UUID_618474C2DE1511DEB74A388C56D89593
|
#define UUID_618474C2DE1511DEB74A388C56D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#ifdef BOOST_NO_EXCEPTIONS
|
#ifdef BOOST_NO_EXCEPTIONS
|
||||||
@ -482,4 +484,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_898984B4076411DD973EDFA055D89593
|
#ifndef UUID_898984B4076411DD973EDFA055D89593
|
||||||
#define UUID_898984B4076411DD973EDFA055D89593
|
#define UUID_898984B4076411DD973EDFA055D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
@ -39,4 +41,7 @@ boost
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
|
#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
|
||||||
#define UUID_6F463AC838DF11DDA3E6909F56D89593
|
#define UUID_6F463AC838DF11DDA3E6909F56D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/detail/type_info.hpp>
|
#include <boost/exception/detail/type_info.hpp>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -42,4 +44,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_C3E1741C754311DDB2834CCA55D89593
|
#ifndef UUID_C3E1741C754311DDB2834CCA55D89593
|
||||||
#define UUID_C3E1741C754311DDB2834CCA55D89593
|
#define UUID_C3E1741C754311DDB2834CCA55D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/detail/sp_typeinfo.hpp>
|
#include <boost/detail/sp_typeinfo.hpp>
|
||||||
#include <boost/current_function.hpp>
|
#include <boost/current_function.hpp>
|
||||||
@ -44,92 +46,34 @@ boost
|
|||||||
namespace
|
namespace
|
||||||
exception_detail
|
exception_detail
|
||||||
{
|
{
|
||||||
#ifdef BOOST_NO_TYPEID
|
|
||||||
struct
|
struct
|
||||||
type_info_
|
type_info_
|
||||||
{
|
{
|
||||||
detail::sp_typeinfo const * type_;
|
detail::sp_typeinfo const & type_;
|
||||||
char const * name_;
|
|
||||||
|
|
||||||
explicit
|
|
||||||
type_info_( detail::sp_typeinfo const & type, char const * name ):
|
|
||||||
type_(&type),
|
|
||||||
name_(name)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
friend
|
|
||||||
bool
|
|
||||||
operator==( type_info_ const & a, type_info_ const & b )
|
|
||||||
{
|
|
||||||
return (*a.type_)==(*b.type_);
|
|
||||||
}
|
|
||||||
|
|
||||||
friend
|
|
||||||
bool
|
|
||||||
operator<( type_info_ const & a, type_info_ const & b )
|
|
||||||
{
|
|
||||||
return 0!=(a.type_->before(*b.type_));
|
|
||||||
}
|
|
||||||
|
|
||||||
char const *
|
|
||||||
name() const
|
|
||||||
{
|
|
||||||
return name_;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
struct
|
|
||||||
type_info_
|
|
||||||
{
|
|
||||||
detail::sp_typeinfo const * type_;
|
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
type_info_( detail::sp_typeinfo const & type ):
|
type_info_( detail::sp_typeinfo const & type ):
|
||||||
type_(&type)
|
type_(type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
type_info_( detail::sp_typeinfo const & type, char const * ):
|
|
||||||
type_(&type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
friend
|
|
||||||
bool
|
|
||||||
operator==( type_info_ const & a, type_info_ const & b )
|
|
||||||
{
|
|
||||||
return (*a.type_)==(*b.type_);
|
|
||||||
}
|
|
||||||
|
|
||||||
friend
|
friend
|
||||||
bool
|
bool
|
||||||
operator<( type_info_ const & a, type_info_ const & b )
|
operator<( type_info_ const & a, type_info_ const & b )
|
||||||
{
|
{
|
||||||
return 0!=(a.type_->before(*b.type_));
|
return 0!=(a.type_.before(b.type_));
|
||||||
}
|
|
||||||
|
|
||||||
char const *
|
|
||||||
name() const
|
|
||||||
{
|
|
||||||
return type_->name();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
operator!=( type_info_ const & a, type_info_ const & b )
|
|
||||||
{
|
|
||||||
return !(a==b);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::tag_type_name<T>())
|
#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T))
|
||||||
|
|
||||||
#ifndef BOOST_NO_RTTI
|
#ifndef BOOST_NO_RTTI
|
||||||
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
|
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_0552D49838DD11DD90146B8956D89593
|
#ifndef UUID_0552D49838DD11DD90146B8956D89593
|
||||||
#define UUID_0552D49838DD11DD90146B8956D89593
|
#define UUID_0552D49838DD11DD90146B8956D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/exception/get_error_info.hpp>
|
#include <boost/exception/get_error_info.hpp>
|
||||||
@ -49,27 +51,33 @@ boost
|
|||||||
namespace
|
namespace
|
||||||
exception_detail
|
exception_detail
|
||||||
{
|
{
|
||||||
template <class T>
|
inline
|
||||||
struct
|
exception const *
|
||||||
is_convertible_to_boost_exception
|
get_boost_exception( exception const * e )
|
||||||
{
|
{
|
||||||
struct yes { char q[100]; };
|
return e;
|
||||||
typedef char no;
|
}
|
||||||
static yes check(exception const *);
|
|
||||||
static no check(...);
|
|
||||||
enum e { value=sizeof(check((T*)0))==sizeof(yes) };
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class T>
|
inline
|
||||||
struct
|
exception const *
|
||||||
is_convertible_to_std_exception
|
get_boost_exception( ... )
|
||||||
{
|
{
|
||||||
struct yes { char q[100]; };
|
return 0;
|
||||||
typedef char no;
|
}
|
||||||
static yes check(std::exception const *);
|
|
||||||
static no check(...);
|
inline
|
||||||
enum e { value = sizeof(check((T*)0))==sizeof(yes) };
|
std::exception const *
|
||||||
};
|
get_std_exception( std::exception const * e )
|
||||||
|
{
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::exception const *
|
||||||
|
get_std_exception( ... )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
char const *
|
char const *
|
||||||
@ -127,7 +135,7 @@ boost
|
|||||||
}
|
}
|
||||||
#ifndef BOOST_NO_RTTI
|
#ifndef BOOST_NO_RTTI
|
||||||
tmp << std::string("Dynamic exception type: ") <<
|
tmp << std::string("Dynamic exception type: ") <<
|
||||||
(be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).name() << '\n';
|
(be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name() << '\n';
|
||||||
#endif
|
#endif
|
||||||
if( with_what && se )
|
if( with_what && se )
|
||||||
tmp << "std::exception::what: " << wh << '\n';
|
tmp << "std::exception::what: " << wh << '\n';
|
||||||
@ -143,9 +151,7 @@ boost
|
|||||||
std::string
|
std::string
|
||||||
diagnostic_information( T const & e )
|
diagnostic_information( T const & e )
|
||||||
{
|
{
|
||||||
boost::exception const * be=exception_detail::is_convertible_to_boost_exception<T>::value?((boost::exception const *)&e):0;
|
return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true);
|
||||||
std::exception const * se=exception_detail::is_convertible_to_std_exception<T>::value?((std::exception const *)&e):0;
|
|
||||||
return exception_detail::diagnostic_information_impl(be,se,true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
@ -170,4 +176,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,20 +5,17 @@
|
|||||||
|
|
||||||
#ifndef UUID_F0EE17BE6C1211DE87FF459155D89593
|
#ifndef UUID_F0EE17BE6C1211DE87FF459155D89593
|
||||||
#define UUID_F0EE17BE6C1211DE87FF459155D89593
|
#define UUID_F0EE17BE6C1211DE87FF459155D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "boost/exception/info.hpp"
|
#include "boost/exception/info.hpp"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable:4996) //'strerror': This function or variable may be unsafe
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
{
|
{
|
||||||
@ -41,8 +38,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
|
#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
|
||||||
#define UUID_274DA366004E11DCB1DDFE2E56D89593
|
#define UUID_274DA366004E11DCB1DDFE2E56D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
@ -370,10 +372,6 @@ boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable:4512) //assignment operator could not be generated
|
|
||||||
#endif
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class
|
class
|
||||||
clone_impl:
|
clone_impl:
|
||||||
@ -407,9 +405,6 @@ boost
|
|||||||
throw*this;
|
throw*this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -421,4 +416,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_1A590226753311DD9E4CCF6156D89593
|
#ifndef UUID_1A590226753311DD9E4CCF6156D89593
|
||||||
#define UUID_1A590226753311DD9E4CCF6156D89593
|
#define UUID_1A590226753311DD9E4CCF6156D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/exception.hpp>
|
#include <boost/exception/exception.hpp>
|
||||||
#include <boost/exception/detail/error_info_impl.hpp>
|
#include <boost/exception/detail/error_info_impl.hpp>
|
||||||
@ -122,4 +124,7 @@ boost
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593
|
#ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593
|
||||||
#define UUID_8D22C4CA9CC811DCAA9133D256D89593
|
#define UUID_8D22C4CA9CC811DCAA9133D256D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/exception.hpp>
|
#include <boost/exception/exception.hpp>
|
||||||
#include <boost/exception/to_string_stub.hpp>
|
#include <boost/exception/to_string_stub.hpp>
|
||||||
@ -95,7 +97,7 @@ boost
|
|||||||
{
|
{
|
||||||
shared_ptr<error_info_base> const & p = i->second;
|
shared_ptr<error_info_base> const & p = i->second;
|
||||||
#ifndef BOOST_NO_RTTI
|
#ifndef BOOST_NO_RTTI
|
||||||
BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p)==ti );
|
BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );
|
||||||
#endif
|
#endif
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
@ -159,4 +161,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_63EE924290FB11DC87BB856555D89593
|
#ifndef UUID_63EE924290FB11DC87BB856555D89593
|
||||||
#define UUID_63EE924290FB11DC87BB856555D89593
|
#define UUID_63EE924290FB11DC87BB856555D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/info.hpp>
|
#include <boost/exception/info.hpp>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
@ -68,4 +70,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_7E48761AD92811DC9011477D56D89593
|
#ifndef UUID_7E48761AD92811DC9011477D56D89593
|
||||||
#define UUID_7E48761AD92811DC9011477D56D89593
|
#define UUID_7E48761AD92811DC9011477D56D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
#include <boost/exception/detail/is_output_streamable.hpp>
|
#include <boost/exception/detail/is_output_streamable.hpp>
|
||||||
@ -75,4 +77,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#ifndef UUID_E788439ED9F011DCB181F25B55D89593
|
#ifndef UUID_E788439ED9F011DCB181F25B55D89593
|
||||||
#define UUID_E788439ED9F011DCB181F25B55D89593
|
#define UUID_E788439ED9F011DCB181F25B55D89593
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/to_string.hpp>
|
#include <boost/exception/to_string.hpp>
|
||||||
#include <boost/exception/detail/object_hex_dump.hpp>
|
#include <boost/exception/detail/object_hex_dump.hpp>
|
||||||
@ -101,4 +103,7 @@ boost
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4702) //unreachable code
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4702) //unreachable code
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -7,11 +7,7 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
project
|
project : requirements <exception-handling>on ;
|
||||||
: requirements
|
|
||||||
<exception-handling>on
|
|
||||||
<warnings>all
|
|
||||||
;
|
|
||||||
|
|
||||||
#to_string
|
#to_string
|
||||||
|
|
||||||
|
@ -10,11 +10,6 @@
|
|||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4512) //assignment operator could not be generated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef boost::error_info<struct my_tag,int> my_info;
|
typedef boost::error_info<struct my_tag,int> my_info;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4702) //unreachable code
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
test_exception:
|
test_exception:
|
||||||
virtual boost::exception,
|
virtual boost::exception,
|
||||||
|
@ -8,12 +8,6 @@
|
|||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4702) //unreachable code
|
|
||||||
#pragma warning(disable:4512) //assignment operator could not be generated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct throws_on_copy;
|
struct throws_on_copy;
|
||||||
struct non_printable { };
|
struct non_printable { };
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include <boost/exception/info.hpp>
|
#include <boost/exception/info.hpp>
|
||||||
#include <boost/exception/diagnostic_information.hpp>
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
my_exception:
|
my_exception:
|
||||||
|
@ -9,11 +9,6 @@
|
|||||||
#include <boost/exception_ptr.hpp>
|
#include <boost/exception_ptr.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#ifdef BOOST_MSVC
|
|
||||||
#pragma warning(disable:4702) //unreachable code
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_test_int,int> test_data;
|
typedef boost::error_info<struct tag_test_int,int> test_data;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -45,7 +40,7 @@ boost_throw_exception_test()
|
|||||||
int const * line=boost::get_error_info<boost::throw_line>(x);
|
int const * line=boost::get_error_info<boost::throw_line>(x);
|
||||||
BOOST_TEST( file && *file );
|
BOOST_TEST( file && *file );
|
||||||
BOOST_TEST( function && *function );
|
BOOST_TEST( function && *function );
|
||||||
BOOST_TEST( line && *line==37 );
|
BOOST_TEST( line && *line==32 );
|
||||||
}
|
}
|
||||||
catch(
|
catch(
|
||||||
... )
|
... )
|
||||||
@ -66,7 +61,7 @@ boost_throw_exception_test()
|
|||||||
int const * data=boost::get_error_info<test_data>(x);
|
int const * data=boost::get_error_info<test_data>(x);
|
||||||
BOOST_TEST( file && *file );
|
BOOST_TEST( file && *file );
|
||||||
BOOST_TEST( function && *function );
|
BOOST_TEST( function && *function );
|
||||||
BOOST_TEST( line && *line==57 );
|
BOOST_TEST( line && *line==52 );
|
||||||
BOOST_TEST( data && *data==42 );
|
BOOST_TEST( data && *data==42 );
|
||||||
}
|
}
|
||||||
catch(
|
catch(
|
||||||
|
Reference in New Issue
Block a user