Commit Graph

104 Commits

Author SHA1 Message Date
9238ef8e7f Avoid including deprecated atomic_count.hpp header. (#59)
boost/detail/atomic_count.hpp was moved into boost/smart_ptr/detail and
is now deprecated and emits warnings.
2025-03-01 16:25:20 -08:00
9259706f08 Disable exception_ptr_test2 when exceptions aren't enabled 2022-01-26 01:49:45 +02:00
941754ed23 Add exception_ptr_test2.cpp 2022-01-26 01:07:46 +02:00
20c833978f Fix and unit test for issue #37 2021-02-11 16:02:14 -08:00
c445901088 GHA CI 2020-12-22 17:26:53 -08:00
9bd0584aa9 Fixed multi-thread bug introduced by the previous change to copy_exception. 2020-08-14 19:42:29 -07:00
865cb399d5 Change __CODEGEARC__ to BOOST_CODEGEARC, which is defined in Boost config for the Embarcadero non-clang-based compilers. (#32) 2020-04-30 14:26:21 -07:00
af98afb3d1 Attempt to solve issue #10 (#24)
* Attempt to solve issue #10

In boost::current_exception(), after all supported types of exception have
been checked for, a boost::unknown_exception is stored in the
boost::exception_ptr as a last resort to signal that an exception was indeed
stored, but that the actual type and value of the exception was lost.

Now, in case C++11 std::current_exception() is supported, the
std::exception_ptr result of calling std::current_exception() is what
gets stored inside the boost::exception_ptr. Later, inside
boost::rethrow_exception, the std::exception_ptr is retrieved from
the boost::exception_ptr and whatever exception it stores is thrown via
std::rethrow_exception().

The main benefit is than now any exception thrown via plain 'throw'
can be trasnported via boost::exception_ptr. Before this change it was
required that the throw site either used boost::enable_current_exception()
or boost::throw_exception() or threw an exception type inheriting from
boost::exception, which was impossible for third party software
that does not use Boost.Exception.

The detection of std::current_exception() is currently done via config macro
BOOST_NO_CXX11_NOEXCEPT, assuming that if 'noexcept' is supported then
std::exception_ptr is also supported. A better solution would require a new
dedicated macro in Boost.Config.

* Detect support for std::current_exception() via config macro BOOST_NO_CXX11_HDR_EXCEPTION

The temporary solution via BOOST_NO_CXX11_NOEXCEPT was an ugly hack
that is no longer necessary now that Boost.Config has
BOOST_NO_CXX11_HDR_EXCEPTION (pending merge to develop).

* Attempt to solve issue #10

In boost::current_exception(), after all supported types of exception have
been checked for, a boost::unknown_exception is stored in the
boost::exception_ptr as a last resort to signal that an exception was indeed
stored, but that the actual type and value of the exception was lost.

Now, in case C++11 std::current_exception() is supported, the
std::exception_ptr result of calling std::current_exception() is what
gets stored inside the boost::exception_ptr. Later, inside
boost::rethrow_exception, the std::exception_ptr is retrieved from
the boost::exception_ptr and whatever exception it stores is thrown via
std::rethrow_exception().

The main benefit is than now any exception thrown via plain 'throw'
can be trasnported via boost::exception_ptr. Before this change it was
required that the throw site either used boost::enable_current_exception()
or boost::throw_exception() or threw an exception type inheriting from
boost::exception, which was impossible for third party software
that does not use Boost.Exception.

The detection of std::current_exception() is currently done via config macro
BOOST_NO_CXX11_NOEXCEPT, assuming that if 'noexcept' is supported then
std::exception_ptr is also supported. A better solution would require a new
dedicated macro in Boost.Config.

* Detect support for std::current_exception() via config macro BOOST_NO_CXX11_HDR_EXCEPTION

The temporary solution via BOOST_NO_CXX11_NOEXCEPT was an ugly hack
that is no longer necessary now that Boost.Config has
BOOST_NO_CXX11_HDR_EXCEPTION (pending merge to develop).

* Document detection of C++11 std::current_exception through BOOST_NO_CXX11_HDR_EXCEPTION

* Added dist: trusty for Travis config, as recommended by pdimov in issue #10

* Stupid gcc 4.7 and 4.8 are confused initializing a reference with braces, using equal sign hoping it works (tested similar code on godbolt).
2020-01-29 13:41:48 -08:00
e8c57591a3 Missing #include <stdlib.h> in tests 2020-01-28 16:39:28 -08:00
87f0473396 Fixed link error in no_exceptions_test.cpp 2019-12-21 19:14:44 -08:00
d0963a7cf6 Added missing #include in cloning_test.cpp 2019-12-21 14:27:14 -08:00
8e61e8e9fd #include guards prefixed with BOOST_EXCEPTION_ 2019-12-21 14:15:17 -08:00
f1af13409d BOOST_NO_EXCEPTIONS tests updated for [noreturn] 2019-06-06 15:09:27 -07:00
607268dd8e Replaced throw() with BOOST_NOEXCEPT_OR_NOTHROW
With throw(), Visual Studio 2017 emitted a warning "C26439 SPECIAL_NOEXCEPT". Reproducible at least if code analysis was set to level: "Microsoft Native Recommended Rules".

https://docs.microsoft.com/en-us/visualstudio/code-quality/c26439?view=vs-2017
2019-01-28 09:48:53 +02:00
de6cef966b Fix unit tests that did not return report_errors() 2018-09-17 07:32:49 -04:00
50899b8f1b added bug_11874_test.cpp 2017-07-05 16:27:16 -07:00
38cdb50eb2 Deleted N3757 2017-05-06 10:54:42 -07:00
32d831c4b2 restoring non-intrusive exception_ptr code 2017-04-23 17:58:28 -07:00
991d600f01 Fixing bug in exception_ptr cloning of error_info objects. 2017-03-15 11:39:42 -07:00
cf05dc079b Removing non-intrusive exception_ptr support. 2017-03-13 15:07:09 -07:00
972667f52e Tweaks to try to defeat g++4.6.3 2017-01-03 14:35:11 -08:00
59666dcdb0 Adding missing include in error_info_basic_test.cpp 2017-01-03 00:06:25 -08:00
07d5ef529b Added error_info_basic_test.cpp to test ticket 11874 2017-01-03 00:00:52 -08:00
2cdbdfcf4e Deleting unused test/exception_hpp_test.cpp, removing c++11 from build requests. 2017-01-02 17:04:32 -08:00
6cf231330a Ticket #12059 2016-10-26 12:35:25 -07:00
e1378f7aef Ticket #12553, plus tabs converted to spaces. 2016-10-26 11:51:40 -07:00
c57eefbf42 More complete error_info testing 2015-03-25 14:28:54 -07:00
5a040eedf5 rvalue references support in error_info 2015-03-24 15:44:28 -07:00
2a68f099bf Ticket 9069, thanks sarum9in
[SVN r85634]
2013-09-10 05:05:41 +00:00
e97bcb4c56 N3757
[SVN r85538]
2013-08-31 23:24:40 +00:00
9e012e1fdf Ticket #8312, thanks Greg Julus
[SVN r83588]
2013-03-26 17:25:10 +00:00
9b100b0c9d Added verbose parameter to boost::diagnostic_information.
[SVN r82179]
2012-12-23 03:31:48 +00:00
4cdfbb9ec6 Ticket 6878, thanks Dave Deakins
[SVN r79013]
2012-06-19 22:30:12 +00:00
b43961cf94 Bug in exception_ptr_test.cpp.
[SVN r79012]
2012-06-19 20:51:02 +00:00
f576e14dbc Ticket 6374, thanks edA-qa
[SVN r76403]
2012-01-11 01:13:03 +00:00
32e2b33250 Fixing two issues with non-intrusive exception cloning support.
[SVN r72924]
2011-07-05 23:53:33 +00:00
cc0d73af9d bug 5384
[SVN r70988]
2011-04-05 00:11:42 +00:00
fb4ed73b5e Incorrect check in cloning_test fixed, and workaround for Metrowerks.
[SVN r69619]
2011-03-07 07:39:50 +00:00
c210c38dae Revert [67111] (addition of boost/detail/iomanip.hpp) and all the commits that depend on it. ([68137], [68140], [68141], [68154], and [68165]).
[SVN r68168]
2011-01-15 08:11:51 +00:00
f1a4e59469 Updating line numbers in unit test.
[SVN r68154]
2011-01-14 14:41:20 +00:00
e43210c417 Replacing the use of <iomanip> with <boost/detail/iomanip.hpp> across Boost.
On Linux, GNU's libstdc++, which is the default stdlib for icc and clang,
cannot parse the <iomanip> header in version 4.5+ (which thankfully neither
compiler advises the use of yet), as it's original C++98-friendly
implementation has been replaced with a gnu++0x implementation.
<boost/detail/iomanip.hpp> is a portable implementation of <iomanip>, providing
boost::detail::setfill, boost::detail::setbase, boost::detail::setw,
boost::detail::setprecision, boost::detail::setiosflags and
boost::detail::resetiosflags. 



[SVN r68140]
2011-01-14 02:35:58 +00:00
56ae4311bb default gcc visibility for exception types, <link>static requirement in test Jamfile.
[SVN r65763]
2010-10-05 15:04:50 +00:00
3b4cdfce47 Non-intrusive exception_ptr support for msvc 7.1/8.0/9.0 (thanks Anthony Williams)
[SVN r65204]
2010-09-03 02:03:15 +00:00
5dbd4c8f32 disabling the non-intrusive exception_ptr support in tests, seems buggy..
[SVN r65161]
2010-09-01 07:59:35 +00:00
17304c365c non-intrusive exception_ptr support for msvc 7.1 and 8.0 (for now) thanks Anthony Williams
[SVN r65159]
2010-09-01 06:05:11 +00:00
79964f73df fixing runtime errors in this test, hopefully
[SVN r63564]
2010-07-03 21:24:26 +00:00
c251404656 workaround for double-destruction bugs in compilers: with this, boost::exception objects should survive the case when the destructor is called twice.
[SVN r61602]
2010-04-27 01:14:03 +00:00
f6588caf4e detab
[SVN r59945]
2010-02-26 07:58:55 +00:00
0cebd7efbf Fixing problems found by the vacpp test.
[SVN r59743]
2010-02-18 05:58:00 +00:00
1af9381775 fixing bug in printing failure info in exception_ptr_test.cpp
[SVN r59419]
2010-02-01 17:52:20 +00:00