Compare commits

..

5 Commits

7 changed files with 52 additions and 56 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.vscode/ipch/*

View File

@ -6,6 +6,8 @@ language: cpp
sudo: false
dist: trusty
python: "2.7"
branches:

View File

@ -1,4 +1,4 @@
# Copyright 2016-2018 Peter Dimov
# Copyright 2016-2019 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
@ -14,26 +14,24 @@ branches:
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
CXXSTD: 14,17
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\cygwin\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\cygwin64\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
@ -55,4 +53,4 @@ build: off
test_script:
- PATH=%ADDPATH%%PATH%
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- b2 -j 3 libs/throw_exception/test toolset=%TOOLSET% %CXXSTD%
- b2 -j3 libs/throw_exception/test toolset=%TOOLSET% %CXXSTD%

View File

@ -21,6 +21,7 @@ namespace boost { namespace exception_detail { using boost::shared_ptr; } }
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#pragma warning(disable: 4265)
#endif
namespace
@ -165,7 +166,7 @@ boost
protected:
~error_info_container() throw()
~error_info_container() BOOST_NOEXCEPT_OR_NOTHROW
{
}
};
@ -233,7 +234,7 @@ boost
#ifdef __HP_aCC
//On HP aCC, this protected copy constructor prevents throwing boost::exception.
//On all other platforms, the same effect is achieved by the pure virtual destructor.
exception( exception const & x ) throw():
exception( exception const & x ) BOOST_NOEXCEPT_OR_NOTHROW:
data_(x.data_),
throw_function_(x.throw_function_),
throw_file_(x.throw_file_),
@ -242,7 +243,7 @@ boost
}
#endif
virtual ~exception() throw()
virtual ~exception() BOOST_NOEXCEPT_OR_NOTHROW
#ifndef __HP_aCC
= 0 //Workaround for HP aCC, =0 incorrectly leads to link errors.
#endif
@ -287,7 +288,7 @@ boost
inline
exception::
~exception() throw()
~exception() BOOST_NOEXCEPT_OR_NOTHROW
{
}
@ -337,7 +338,7 @@ boost
{
}
~error_info_injector() throw()
~error_info_injector() BOOST_NOEXCEPT_OR_NOTHROW
{
}
};
@ -398,7 +399,7 @@ boost
virtual void rethrow() const = 0;
virtual
~clone_base() throw()
~clone_base() BOOST_NOEXCEPT_OR_NOTHROW
{
}
};
@ -445,7 +446,7 @@ boost
copy_boost_exception(this,&x);
}
~clone_impl() throw()
~clone_impl() BOOST_NOEXCEPT_OR_NOTHROW
{
}
@ -487,7 +488,7 @@ boost
{
}
~wrapexcept() throw()
~wrapexcept() BOOST_NOEXCEPT_OR_NOTHROW
{
}
};

View File

@ -54,7 +54,7 @@ namespace boost
{
#ifdef BOOST_NO_EXCEPTIONS
void throw_exception( std::exception const & e ); // user defined
BOOST_NORETURN void throw_exception( std::exception const & e ); // user defined
#else

View File

@ -5,27 +5,24 @@
#define BOOST_NO_EXCEPTIONS
#define BOOST_EXCEPTION_DISABLE
#include <boost/throw_exception.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <cstdlib>
class my_exception: public std::exception { };
class my_exception: public std::exception {};
bool called=false;
int main()
{
boost::throw_exception( my_exception() );
return 1;
}
namespace
boost
{
void
throw_exception( std::exception const & )
{
called=true;
}
}
namespace boost
{
int
main()
{
boost::throw_exception(my_exception());
BOOST_TEST(called);
return boost::report_errors();
}
void throw_exception( std::exception const & )
{
std::exit( 0 );
}
} // namespace boost

View File

@ -4,27 +4,24 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_NO_EXCEPTIONS
#include <boost/throw_exception.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <cstdlib>
class my_exception: public std::exception { };
class my_exception: public std::exception {};
bool called=false;
int main()
{
boost::throw_exception( my_exception() );
return 1;
}
namespace
boost
{
void
throw_exception( std::exception const & )
{
called=true;
}
}
namespace boost
{
int
main()
{
boost::throw_exception(my_exception());
BOOST_TEST(called);
return boost::report_errors();
}
void throw_exception( std::exception const & )
{
std::exit( 0 );
}
} // namespace boost