Commit Graph

486 Commits

Author SHA1 Message Date
Glen Fernandes 50491408b1 Implement noinit_allocator_adaptor 2019-04-28 02:10:37 -04:00
Glen Fernandes 62fff4d829 Update documentation for default_allocator 2019-04-27 19:11:45 -04:00
Glen Fernandes 151f2cf645 Support C++03 implementations that require reference and const_pointer 2019-04-27 06:15:24 -04:00
Glen Fernandes 5a549b8b22 Update max_size() implementation and tests 2019-04-25 13:05:06 -04:00
Glen Fernandes e859d01186 Correct max_size() when PTRDIFF_MAX is less than SIZE_MAX 2019-04-25 12:11:34 -04:00
Glen Fernandes 69f7b0c76b Update computation of max_size 2019-04-25 11:49:36 -04:00
Glen Fernandes ba79489ea1 Remove null check in allocate 2019-04-25 02:32:31 -04:00
Glen Fernandes 9c88e5cbb1 Implement default_allocator 2019-04-25 02:22:45 -04:00
Peter Dimov fb417474ae Mark detail/sp_typeinfo.hpp as deprecated 2019-04-22 17:28:31 +03:00
Glen Fernandes a78c25e4ab Print type with cvref qualifiers 2019-04-20 03:04:06 -04:00
Hans Dembinski 02041f6c9f report_errors with expected failures (#51)
* Return number of failures from report_errors
2019-04-19 23:55:50 -07:00
Peter Dimov f14a464b29 Only disable C4127 on msvc-pre-14.0 2019-04-19 23:41:26 +03:00
Peter Dimov af7e01b8c4 Merge branch 'no_exceptions_support-conditional-expression-is-constant' of https://github.com/Kojoley/core into feature/no-exceptions-support 2019-04-19 23:33:33 +03:00
Peter Dimov 40424bf0b6 Merge branch 'develop' into feature/no-exceptions-support 2019-04-19 23:28:02 +03:00
Peter Dimov 8d4c039f34 Remove unnecessary include 2019-04-19 23:27:37 +03:00
Peter Dimov bb2e7e4c69 Add __clang__ to BOOST_NO_TYPEID comparison conditions 2019-04-19 20:13:41 +03:00
Andrey Semashev 0c5cff67b6 Corrected a typo in the comment. 2019-04-13 19:19:40 +03:00
Nikita Kniazev 8ac5b5b00e no_exceptions_support: Suppress conditional expression is constant warning 2019-03-26 17:01:41 +03:00
Glen Fernandes 4ea704e80a Add use_default to Core 2019-02-22 16:51:33 -05:00
Peter Dimov 7f96d56eff Simplify implementation of BOOST_TEST_TRAIT_SAME 2019-02-06 04:38:27 +02:00
Peter Dimov dcbe62c6bf Add BOOST_TEST_TRAIT_SAME 2019-02-06 02:02:40 +02:00
Peter Dimov d8895bab46 Mark checked_delete as noexcept 2019-01-28 19:15:24 +02:00
Andrey Semashev 7d70451b49 Updated the comment about __cxa_uncaught_exceptions. 2019-01-08 04:47:51 +03:00
Andrey Semashev bf932b4908 Removed the use of __cxa_uncaught_exceptions.
Travis CI shows linking errors on Linux and OS X when __cxa_uncaught_exceptions
is used to implement uncaught_exceptions. There's probably some library missing,
which should be linked in implicitly by the compiler, or the library indeed
does not export the symbol. In any case, __cxa_get_globals-based implementation
should provide the same effect.
2019-01-08 04:17:24 +03:00
Andrey Semashev dea6b04157 Added workarounds for gcc < 4.7 on Linux and OpenBSD.
Apparently, gcc < 4.7 on Linux also don't have __cxa_get_globals
declaration in cxxabi.h. Declare the function ourselves.

Also, on OpenBSD it seems there is no declaration either, and
on that platform the function implementation has no exception
specification, like on FreeBSD. Add a declaration of that platform.

Lastly, changed __cxa_get_globals and _getptd-based implementations
to avoid violating strict aliasing rules. This is still formally UB
to access structure fields like we do, but this is one less reason to
cause miscompilation or compiler warnings.
2019-01-08 00:23:09 +03:00
Andrey Semashev 9f9da9dc9b Limit __cxa_uncaught_exceptions to only since libc++abi 1002 and later. 2019-01-07 13:34:52 +03:00
Andrey Semashev cdcc50a455 Added an implementation for uncaught_exceptions for libc++abi.
This should fix compilation errors due to missing declaration of
__cxa_get_globals when compiled against libc++ on Linux.
2019-01-07 02:14:31 +03:00
Andrey Semashev 6f3e6254e7 Only declare __cxa_get_globals on MinGW gcc < 4.7, where it's needed.
This should work around differences between the function signatures on other
platforms, like FreeBSD, for example.
2019-01-06 21:29:15 +03:00
Andrey Semashev 3cd1885209 Reorganized code and made __cxa_get_globals signature closer to the original.
This should resolve gcc errors caused by mismatch of the return types of
aur declaration of __cxa_get_globals and the original in cxxabi.h.

Fixes https://github.com/boostorg/core/issues/45.
2018-12-18 20:49:24 +03:00
Andrey Semashev 9d123dc9a3 Added missing include guards. 2018-11-11 13:43:04 +03:00
Andrey Semashev 82957de970 Extracted uncaught_exceptions function from Boost.Log.
The uncaught_exceptions function is functionally equivalent to
unhandled_exceptions_count in Boost.Log and implements functionality
similar to the same named C++17 standard function. Tests and docs are
also included.

One notable difference from std::uncaught_exceptions is that the return
type is unsigned rather than signed. This is deliberate as uncaught_exceptions
must never return a negative value and unsigned int better documents that.
Theoretically, as a counter, it may also overflow.
2018-11-10 17:44:13 +03:00
Peter Dimov a5c891441c Disable boost::swap for const objects. Fixes #43. 2018-10-24 12:23:56 +03:00
Peter Dimov e98a546e89 Use string comparison on MinGW/Cygwin when comparing typeinfo across DLLs 2018-10-21 20:29:10 +03:00
Peter Dimov 3c9c9603ad Add BOOST_SYMBOL_VISIBLE to core_typeid_ 2018-10-21 18:09:31 +03:00
Ion Gaztañaga 79e3bf7175 _set_abort_behavior not supported in old MSVC
Last patch before deprecating old MSVC compilers
2018-10-12 12:17:45 +02:00
Glen Fernandes 1d9d6f579e Qualify empty_init_t and use_empty_value_base 2018-10-01 00:46:43 -04:00
Glen Fernandes 5ed58ee20f Add ADL guard for empty_value and new member typedef 2018-10-01 00:26:08 -04:00
Peter Dimov 81df44e80b MinGW-w64 has no quick_exit either 2018-09-06 05:44:56 +03:00
Peter Dimov 944f27853b Declare _exit as extern 'C' 2018-09-06 05:28:23 +03:00
Peter Dimov 0bc795de4a Merge branch 'develop' into feature/quick_exit 2018-09-06 00:30:15 +03:00
Glen Fernandes d2b20486a0 Call test_results() in BOOST_TEST_THROWS() 2018-09-05 16:40:10 -04:00
Peter Dimov 88acbce1e9 Declare and use _exit under MinGW32 2018-09-05 20:56:03 +03:00
Peter Dimov 0c605bf32f MacOS doesn't have quick_exit; Cygwin doesn't declare it in C++03 mode 2018-09-05 20:45:51 +03:00
Peter Dimov 53772c8c73 Merge branch 'develop' into feature/quick_exit 2018-09-05 20:28:40 +03:00
Peter Dimov 8d4f1bb4af Revert to always using std::abort instead of the platform-specific _exit/_Exit 2018-09-05 20:23:13 +03:00
Peter Dimov d56c31d688 Add noreturn/noexcept; use _exit on msvc-12.0 and earlier (and compatible); use ::quick_exit instead of std::quick_exit 2018-09-05 18:16:15 +03:00
Peter Dimov 5e08874182 Add initial implementation of quick_exit 2018-09-05 17:06:42 +03:00
Glen Fernandes 56bd3784bf Update e-mail address in comments and libraries.json 2018-09-05 08:21:35 -04:00
Peter Dimov cf66842419 MinGW doesn't have _exit either 2018-09-05 08:39:35 +03:00
Peter Dimov 861eb5cf4c Merge branch 'develop' into feature/Exit 2018-09-05 07:24:23 +03:00