forked from boostorg/throw_exception
Compare commits
12 Commits
boost-1.77
...
boost-1.78
Author | SHA1 | Date | |
---|---|---|---|
8c7b14f68b | |||
37ad7254d2 | |||
f6055628e6 | |||
65eddbb2f0 | |||
121c1407fd | |||
5eff93e41b | |||
8787d13e65 | |||
0a922307ec | |||
9ca27bddfc | |||
1d555aff4b | |||
b432f24664 | |||
9f6a2e7b89 |
64
.github/workflows/ci.yml
vendored
64
.github/workflows/ci.yml
vendored
@ -17,24 +17,17 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: gcc-4.7
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: g++-4.7
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: g++-4.8
|
||||
- toolset: gcc-4.9
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: g++-4.9
|
||||
- toolset: gcc-5
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: g++-5
|
||||
- toolset: gcc-6
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: g++-6
|
||||
- toolset: gcc-7
|
||||
cxxstd: "03,11,14,17"
|
||||
@ -45,44 +38,29 @@ jobs:
|
||||
install: g++-8
|
||||
- toolset: gcc-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
os: ubuntu-20.04
|
||||
- toolset: gcc-10
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
- toolset: clang
|
||||
compiler: clang++-3.5
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.5
|
||||
- toolset: clang
|
||||
compiler: clang++-3.6
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.6
|
||||
- toolset: clang
|
||||
compiler: clang++-3.7
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.7
|
||||
- toolset: clang
|
||||
compiler: clang++-3.8
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
install: clang-3.8
|
||||
os: ubuntu-20.04
|
||||
install: g++-10
|
||||
- toolset: gcc-11
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: g++-11
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: clang-3.9
|
||||
- toolset: clang
|
||||
compiler: clang++-4.0
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: clang-4.0
|
||||
- toolset: clang
|
||||
compiler: clang++-5.0
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-16.04
|
||||
os: ubuntu-18.04
|
||||
install: clang-5.0
|
||||
- toolset: clang
|
||||
compiler: clang++-6.0
|
||||
@ -96,21 +74,29 @@ jobs:
|
||||
install: clang-7
|
||||
- toolset: clang
|
||||
compiler: clang++-8
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-20.04
|
||||
install: clang-8
|
||||
- toolset: clang
|
||||
compiler: clang++-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-9
|
||||
- toolset: clang
|
||||
compiler: clang++-10
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-10
|
||||
- toolset: clang
|
||||
compiler: clang++-11
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-11
|
||||
- toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-12
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-10.15
|
||||
@ -169,6 +155,10 @@ jobs:
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
- toolset: msvc-14.3
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2022
|
||||
- toolset: gcc
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
addrmd: 64
|
||||
|
@ -9,6 +9,8 @@ Peter Dimov, Emil Dotchevski
|
||||
:toc: left
|
||||
:idprefix:
|
||||
:docinfo: private-footer
|
||||
:source-highlighter: rouge
|
||||
:source-language: c++
|
||||
|
||||
:leveloffset: +1
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <exception>
|
||||
|
||||
#ifdef BOOST_EXCEPTION_MINI_BOOST
|
||||
#include <memory>
|
||||
@ -390,6 +391,9 @@ boost
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
#if defined(BOOST_NO_EXCEPTIONS)
|
||||
BOOST_NORETURN void throw_exception(std::exception const & e); // user defined
|
||||
#endif
|
||||
|
||||
namespace
|
||||
exception_detail
|
||||
@ -466,7 +470,11 @@ boost
|
||||
void
|
||||
rethrow() const
|
||||
{
|
||||
#if defined(BOOST_NO_EXCEPTIONS)
|
||||
boost::throw_exception(*this);
|
||||
#else
|
||||
throw*this;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <exception>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x593) )
|
||||
# define BOOST_EXCEPTION_DISABLE
|
||||
@ -51,7 +52,7 @@ typedef char (&wrapexcept_s2)[ 2 ];
|
||||
template<class T> wrapexcept_s1 wrapexcept_is_convertible( T* );
|
||||
template<class T> wrapexcept_s2 wrapexcept_is_convertible( void* );
|
||||
|
||||
template<class E, class B, int I = sizeof( wrapexcept_is_convertible<B>( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base;
|
||||
template<class E, class B, std::size_t I = sizeof( wrapexcept_is_convertible<B>( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base;
|
||||
|
||||
template<class E, class B> struct wrapexcept_add_base<E, B, 1>
|
||||
{
|
||||
|
@ -11,7 +11,8 @@
|
||||
],
|
||||
"description": "A common infrastructure for throwing exceptions from Boost libraries.",
|
||||
"category": [
|
||||
"Miscellaneous"
|
||||
"Emulation",
|
||||
"Error-handling"
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
@ -5,27 +5,16 @@
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
//#include <boost/exception_ptr.hpp>
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
typedef boost::shared_ptr<boost::exception_detail::clone_base const> exception_ptr;
|
||||
|
||||
template<class E> exception_ptr make_exception_ptr( E const& e )
|
||||
{
|
||||
return boost::make_shared< boost::wrapexcept<E> >( e );
|
||||
}
|
||||
#include <boost/exception_ptr.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
::make_exception_ptr( my_exception() );
|
||||
boost::make_exception_ptr( my_exception() );
|
||||
}
|
||||
|
||||
namespace boost
|
||||
|
@ -5,29 +5,18 @@
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#define BOOST_EXCEPTION_DISABLE
|
||||
|
||||
//#include <boost/exception_ptr.hpp>
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
typedef boost::shared_ptr<boost::exception_detail::clone_base const> exception_ptr;
|
||||
|
||||
template<class E> exception_ptr make_exception_ptr( E const& e )
|
||||
{
|
||||
return boost::make_shared< boost::wrapexcept<E> >( e );
|
||||
}
|
||||
#include <boost/exception_ptr.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
::make_exception_ptr( my_exception() );
|
||||
boost::make_exception_ptr( my_exception() );
|
||||
}
|
||||
|
||||
namespace boost
|
||||
|
@ -5,6 +5,7 @@
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
@ -27,7 +28,7 @@ void throw_exception( std::exception const &, boost::source_location const & loc
|
||||
int r = 0;
|
||||
|
||||
if( std::strcmp( loc.file_name(), __FILE__ ) != 0 ) ++r;
|
||||
if( loc.line() != 18 ) ++r;
|
||||
if( loc.line() != 19 ) ++r;
|
||||
|
||||
std::exit( r );
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
// Make sure that simple inclusion does not
|
||||
|
Reference in New Issue
Block a user