Glen Fernandes
016af907bd
Make sp_counted_impl_ specialization more generic
2014-02-12 08:46:59 -08:00
Glen Fernandes
7e3ae44bc2
Fix use of size in make_shared for arrays
2014-02-10 21:09:13 -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
54fb49a5be
Use typedef A1 (warnings about unused typedefs)
2014-02-09 11:27:22 -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
87e5debdc2
Minor cosmetic changes in make_shared for arrays
2014-01-28 03:40:54 -08:00
Glen Fernandes
630e4f49f3
Update make_shared for arrays to conform to N3870
...
Update make_shared and allocate_shared for arrays to be confined to the
set of overloads specified in N3870.
2014-01-23 20:40:46 -08:00
Glen Fernandes
e36689bd5e
Correct call to init_list in make_shared and allocate_shared. Move g++ failing case into separate test to not mask other issues.
...
[SVN r81905]
2012-12-13 18:02:25 +00:00
Glen Fernandes
619b168614
Two detail utility functions identifier renaming reverted
...
[SVN r81887]
2012-12-13 04:20:23 +00:00
Glen Fernandes
4ba8d879f1
Use BOOST_NO_CXX11_RVALUE_REFERENCES and BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of the legacy macros. Rename identifiers of detail utility functions.
...
[SVN r81886]
2012-12-13 04:04:23 +00:00
Glen Fernandes
db542de908
Use _internal_get_untyped_deleter in allocate_shared_array and make_shared_array
...
[SVN r81865]
2012-12-11 20:51:05 +00:00
Glen Fernandes
6b0d96af96
Convert function parameter for inner array size into template parameter and make identifiers in array_deleter consistent with those in array_utility
...
[SVN r81782]
2012-12-08 05:25:50 +00:00
Glen Fernandes
1209531fe0
Refactoring in detail array_deleter before adding support for special-casing trivially default-constructible construction and trivially destroyable destruction.
...
[SVN r81748]
2012-12-07 01:53:35 +00:00
Glen Fernandes
188602581d
Add overloads of make_shared and allocate_shared for arrays for E&& where E is typename boost::detail::array_base<T>::type
...
[SVN r81700]
2012-12-04 06:06:23 +00:00
Glen Fernandes
500913db6d
Make specializations of detail array_deleter consistent.
...
[SVN r81681]
2012-12-02 22:05:31 +00:00
Glen Fernandes
cfd4152291
Change make_shared and allocate_shared array form overload for size and inner array initialization list to use const T(&)[N] instead of std::initializer_list<T>.
...
[SVN r81658]
2012-12-01 22:43:57 +00:00
Glen Fernandes
f5adfb0963
Code consistency: Use the same style of #if conditional compilation checks in allocate_shared_array.hpp and make_shared_array.hpp.
...
[SVN r81643]
2012-12-01 05:40:06 +00:00
Glen Fernandes
8597433028
Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead for certain overloads of make_shared and allocate_shared
...
[SVN r81642]
2012-12-01 05:23:37 +00:00
Glen Fernandes
4da0e2b7fc
Use const T (&)[N] for fixed size arrays instead of std::initializer<T> in overloads of make_shared and allocate_shared for arrays.
...
[SVN r81641]
2012-12-01 04:36:41 +00:00
Glen Fernandes
39ff002d2e
More consistency in type parameters in helper details of allocate_shared and make_shared.
...
[SVN r81610]
2012-11-28 07:32:30 +00:00
Glen Fernandes
fceea2e584
Consistent formatting across overloads of make_shared and allocate_shared (array forms).
...
[SVN r81609]
2012-11-28 06:26:50 +00:00
Glen Fernandes
b17205ded7
Optimization: Add specializations of make_array_helper, allocate_array_helper, and array_deleter for fixed size arrays to avoid storing size.
...
[SVN r81608]
2012-11-28 06:07:45 +00:00
Glen Fernandes
ddfcc5f417
Make make_shared_array.hpp and allocate_shared_array.hpp consistent with namespace qualification in rest of smart_ptr.
...
[SVN r81409]
2012-11-18 02:51:06 +00:00
Glen Fernandes
79b229adcd
Cosmetic changes in make_shared_array.hpp and allocate_shared_array.hpp
...
[SVN r81407]
2012-11-17 22:20:32 +00:00
Peter Dimov
94b6487ca1
Replace std::forward with detail::sp_forward.
...
[SVN r81399]
2012-11-17 16:21:41 +00:00
Glen Fernandes
da9524d637
Minor style change: Fix indentation in allocate_shared_array.hpp and make_shared_array.hpp
...
[SVN r81342]
2012-11-14 15:33:30 +00:00
Glen Fernandes
6b2556edfb
Add additional overload for allocate_shared and make_shared array forms that take initializer list of T for the array types T[M][N]
...
[SVN r81341]
2012-11-14 15:18:50 +00:00
Glen Fernandes
fa513340d7
Tidy long line formatting in allocate_shared_array.hpp and make_shared_array.hpp
...
[SVN r81277]
2012-11-10 02:33:48 +00:00
Glen Fernandes
0e90213746
Change traits for initializer list for g++
...
[SVN r81276]
2012-11-10 02:17:02 +00:00
Glen Fernandes
980070e63f
Add final overload of make_shared and allocate_shared (array forms) for T[][N] with C++11 initializer lists.
...
[SVN r81275]
2012-11-10 01:33:29 +00:00
Glen Fernandes
8cc50a5ce9
Add assertion to overload of make_shared and allocate_shared for T[N] with initializer lists. Rename detail type to be more intuitive.
...
[SVN r81267]
2012-11-09 18:01:39 +00:00
Glen Fernandes
2731957b5b
Add additional overload for make_shared and allocate_shared for arrays for fixed size arrays and initializer lists.
...
[SVN r81266]
2012-11-09 17:30:07 +00:00
Glen Fernandes
fe06c120b9
Add overloads to support fixed size arrays, T[N], to allocate_shared (variadic) and make_shared (variadic) and make_shared_noinit.
...
[SVN r81265]
2012-11-09 17:12:56 +00:00
Glen Fernandes
ffa3327817
For allocate_shared and make_shared: Separate test case that g++ does support yet. Remove macros testing for no partial specialization in traits. Add additional traits.
...
[SVN r81261]
2012-11-09 16:06:48 +00:00
Glen Fernandes
d512eaaa0f
Change make_shared and allocate_shared array form semantics with initializer lists overload that takes no size.
...
[SVN r81259]
2012-11-09 10:14:55 +00:00
Glen Fernandes
730980f3ee
Clean up code in allocate_shared_array.hpp and make_shared_array.hpp
...
[SVN r81258]
2012-11-09 09:14:23 +00:00
Glen Fernandes
3d50db11b9
Add C++11 initializer list support for make_shared and allocate_shared array forms.
...
[SVN r81257]
2012-11-09 06:17:05 +00:00
Glen Fernandes
5d9312239c
Update allocate_shared and make_shared to treat multidimensional array as single dimension. Remove detail array_helper. Add detail array traits. Update tests.
...
[SVN r81236]
2012-11-07 18:37:17 +00:00
Glen Fernandes
dc5406aa5a
Add support for make_shared of array of arrays. Correctly destroy elements and construct elements for the variadic template constructor variants.
...
[SVN r81229]
2012-11-07 14:42:10 +00:00
Peter Dimov
d8eb2fc105
Fix g++ issues.
...
[SVN r81222]
2012-11-06 15:10:32 +00:00
Glen Fernandes
6662ae7242
Add allocate_shared and make_shared for shared_ptr arrays of runtime size. Fulfills need for allocate_shared_array and make_shared_array.
...
[SVN r81219]
2012-11-06 14:17:32 +00:00