Commit Graph

89 Commits

Author SHA1 Message Date
Peter Dimov
8b22f5cb4f Remove uses of BOOST_OVERRIDE and BOOST_NOEXCEPT_OR_NOTHROW 2024-10-04 21:27:07 +03:00
Peter Dimov
1c988756d5 Remove uses of BOOST_CONSTEXPR 2024-10-03 18:31:59 +03:00
Peter Dimov
82bee8581d Remove uses of BOOST_SP_NOEXCEPT from allocate_shared_array.hpp 2024-10-03 18:15:26 +03:00
Peter Dimov
d908c4d288 Remove requires_cxx11.hpp 2024-09-24 17:47:51 +03:00
Peter Dimov
78fd14f412 Add C++03 deprecation notice 2023-03-06 03:54:51 +02:00
Glen Fernandes
121312cc22 Use allocator access utilities 2020-05-21 23:14:23 -04:00
Glen Fernandes
2dd35e5fbc Mark functions with BOOST_OVERRIDE 2020-04-13 15:34:13 -04:00
Glen Fernandes
3dffa64f58 Bind allocator to element type, not scalar type 2019-05-15 07:33:04 -04:00
Glen Fernandes
872bf10347 Move construct and destroy from Smart_Ptr to Core 2019-05-03 17:39:25 -04:00
Glen Fernandes
d593061b15 Move construct and destroy utilities to common header 2019-05-02 09:48:45 -04:00
Glen Fernandes
5072045f12 Use boost::noinit_adapt free function 2019-04-29 00:37:55 -04:00
Glen Fernandes
442e179920 Simplify implementation in terms of noinit_adaptor 2019-04-28 22:42:37 -04:00
Peter Dimov
e306b30dcf Use a private detail/sp_typeinfo header instead of the deprecated Core one 2019-04-22 05:25:07 +03:00
Glen Fernandes
fde2e91443 Use traits from TypeTraits 2019-02-22 19:01:55 -05:00
Peter Dimov
51d8167fbf Add more BOOST_SP_NOEXCEPT 2019-01-28 18:46:39 +02:00
Peter Dimov
6d3af760f6 Generously dispense BOOST_SYMBOL_VISIBLE 2018-09-18 03:18:23 +03:00
Glen Fernandes
a2b6ba85f3 Simplify exception safety in array construct utilities 2018-08-01 08:45:10 -04:00
Glen Fernandes
5dfcd2a6e4 Rename parameters to cope with gcc 4.8 -Wshadow 2017-11-27 23:47:13 -05:00
Glen Fernandes
57a585ed46 sp_array_construct condition for trivial should include has_trivial_destructor 2017-11-02 11:53:41 -04:00
Glen Fernandes
a3c8c2125a Use has_trivial_assign in construction utilities 2017-07-04 13:45:56 -04:00
Glen Fernandes
e4ba116d7e Minor refactoring in allocate_shared implementations 2017-06-29 22:33:43 -04:00
Glen Fernandes
be736e5088 Implement allocate_local_shared for arrays
Also fix the local_shared_ptr constructor to use element_type
2017-06-29 13:05:03 -04:00
Glen Fernandes
48294c483f Use new shared_count constructors in allocate_shared 2017-06-29 09:24:02 -04:00
Peter Dimov
81e1cfe301 Merge branch 'develop' into feature/local_shared_ptr 2017-06-21 03:04:16 +03:00
Glen Fernandes
4046186a2d Use BOOST_NOEXCEPT_OR_NOTHROW for get_deleter
throw() optimizes better there with older versions of GCC in C++98.
2017-06-20 19:27:58 -04:00
Peter Dimov
fb17bf685e Add more tests; fix errors 2017-06-20 20:38:26 +03:00
Peter Dimov
028bb2cee8 Fix get_deleter in allocate_shared_array.hpp 2017-06-20 19:33:39 +03:00
Peter Dimov
52d976fde2 Use BOOST_SP_NOEXCEPT, BOOST_SP_NOEXCEPT_WITH_ASSERT 2017-06-12 18:06:54 +03:00
Glen Fernandes
33b18c7da0 Reformat (line wrap at 80 characters) 2017-05-02 08:12:25 -04:00
Glen Fernandes
6bdd3fde65 Add alternative sp_array_construct for trivially destructible case 2017-04-23 01:42:15 -04:00
Glen Fernandes
6ef791c715 Rename identifiers in allocate and deallocate 2017-03-05 22:07:58 -05:00
Glen Fernandes
15ed558a29 Further simplify alignment logic in allocate 2017-03-05 21:39:22 -05:00
Glen Fernandes
106ada7770 Remove unnecessary helper function 2017-03-05 19:13:26 -05:00
Glen Fernandes
9f70f6619f Do not rely on size of type_with_alignment 2017-03-05 19:10:56 -05:00
Glen Fernandes
8c058dfeee Use BOOST_NOEXCEPT_OR_NOTHROW over BOOST_NOEXCEPT 2017-03-04 23:36:24 -05:00
Glen Fernandes
d1bb87d34e Remove the now unnecessary allocate hint parameter 2017-03-01 13:15:23 -05:00
Peter Dimov
1f9c63c34f Fix MSVC parsing problem in allocate_shared_array 2017-03-01 12:08:17 +02:00
Glen Fernandes
52fbf70879 Special case aligning up sizes and change integral constant style 2017-02-28 19:23:02 -05:00
Glen Fernandes
fb59cd574e Copy rebind allocator before impl destruct 2017-02-28 07:21:49 -05:00
Glen Fernandes
970e88897c Revise make_shared and allocate_shared for arrays 2017-02-28 03:47:09 -05:00
Glen Fernandes
75add10b1d Simplify ms_allocator and as_allocator design 2014-02-28 10:19:50 -08:00
Glen Fernandes
8c9e8b5556 Further simplification of ms_allocator 2014-02-12 22:15:15 -08:00
Glen Fernandes
3d279e6c6d Save additional sizeof(void*) bytes for arrays 2014-02-12 13:52:58 -08:00
Glen Fernandes
016af907bd Make sp_counted_impl_ specialization more generic 2014-02-12 08:46:59 -08:00
Glen Fernandes
7ce5b6b2a9 Fix use of ms_init in no C++11 allocator case 2014-02-11 08:39:52 -08:00
Glen Fernandes
57dc400fbf Cosmetic changes in make_shared and make_unique 2014-02-10 21:04:41 -08:00
Glen Fernandes
5f485c2952 Spatial optimization for make_shared for arrays
Saves up to sizeof(void*) + sizeof(size_t) bytes for make_shared and saves
sizeof(void*) + sizeof(size_t) + sizeof(A) bytes for allocate_shared where A is the
supplied allocator type.
2014-02-10 20:54:48 -08:00
Glen Fernandes
c23bd41c44 Refactor make_shared for arrays
Refactor implementation to later simplify making an optimization [for the C++11
allocator case] for when sp_counted_impl_pda destruction invokes the
allocator's destroy function instead of the type's destructor.
2014-02-07 08:03:47 -08:00
Glen Fernandes
154a274916 Update make_shared for arrays to address 2070
This updates make_shared and allocate_shared for arrays in accordance with
report 2070 which requires that allocator_traits<A2>::construct(a2, ptr,
...) is used for construction and allocator_traits<A2>::destroy(a2, ptr)
is used for destruction instead of placement new and destructor
invocation.
2014-02-04 04:46:03 -08:00
Glen Fernandes
63a05a3576 Refactor make_array_helper and array_deleter
Reduce the amount of code in allocate_array_helper, make_array_helper, and
array_deleter using the empty base class optimization technique.
2014-02-03 07:28:01 -08:00