Commit Graph
121 Commits
Author SHA1 Message Date
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
Peter Dimov a64cc5c41c Use allocator)traits<>::destroy in sp_counted_impl_pda::destroy 2014-02-07 17:37:00 +02:00
Glen Fernandes d46e3c7cbd Simplify/tidy array_allocator and array_deleter 2014-02-06 01:38:58 -08:00
Glen Fernandes 6d73b4aa54 Work around VC11 which has broken rebind_traits
VC11 has only partial support for C++11 allocators. For example it has a
non-conforming rebind_alloc and rebind_traits in std::allocator_traits
because it does not support C++11 template aliases.
2014-02-04 23:56:34 -08:00
Peter Dimov 9f5822f427 Add support and test for C++11 construct/destroy in allocate_shared 2014-02-05 02:31:33 +02:00
Glen Fernandes 3ac6dbbf08 Make detail::as_allocator template C++11 friendly 2014-02-04 15:00:24 -08:00
Peter Dimov af5141d492 Merge commit 2014-02-05 00:32:36 +02:00
Peter Dimov 90e74511f7 Add support and tests for C++11 minimal allocators 2014-02-05 00:17:34 +02:00
Glen Fernandes 51ab46a07d Fix use of rebind_traits and rebind_alloc 2014-02-04 12:42:10 -08:00
Glen Fernandes e8595a05af Fix use of rebind_traits and rebind_alloc 2014-02-04 08:43:36 -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
Glen Fernandes 7806737b52 Add make_unique for arrays and objects 2014-01-28 03:58:51 -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
Peter Dimov d7fa365843 Remove obsolete _nmt headers. 2013-12-14 00:15:51 +02:00
Peter Dimov 6e0ee30543 Update atomic_count.hpp to match sp_counted_base.hpp. 2013-12-14 00:01:01 +02:00
Peter Dimov fed15ad8c5 Add support for BOOST_SP_USE_STD_ATOMIC 2013-12-13 22:58:09 +02:00
Peter Dimov bba3b446bd Check return values of pthread_* calls with BOOST_VERIFY, per #8898 2013-12-12 02:36:33 +02:00
Peter Dimov 4c8a558982 Check return values of pthread_* calls with BOOST_VERIFY, per #8904. 2013-12-12 01:42:16 +02:00
Peter Dimov a4f853bfbc Revert "SmartPtr: Remove obsolete MSVC version checks."
This reverts commit 7d1c527ac0.
2013-12-07 19:25:05 +02:00
Peter Dimov 832ed079b9 Revert "Revert MSC_VER changes."
This reverts commit 382fb54a52.
2013-12-07 19:24:44 +02:00
Peter Dimov d9b29beebe Revert "Remove obsolete MSVC check from pragma guard"
This reverts commit e4f24e4d3d.
2013-12-07 19:22:43 +02:00
Peter Dimov 5f69684c8f Revert "SmartPointer: Remove obsolete GCC version checks."
This reverts commit 0e6ddb843e.
2013-12-07 19:21:06 +02:00
Stephen Kelly 0e6ddb843e SmartPointer: Remove obsolete GCC version checks.
[SVN r86063]
2013-09-30 15:57:14 +00:00
Peter Dimov fa91b7d020 Remove #pragma intrinsic( _mm_pause ); not needed, not supported on Intel. Refs #6646, #7318.
[SVN r85995]
2013-09-29 11:31:17 +00:00
Peter Dimov 382fb54a52 Revert MSC_VER changes.
[SVN r85993]
2013-09-29 10:43:15 +00:00
Stephen Kelly e4f24e4d3d Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
Stephen Kelly 7d1c527ac0 SmartPtr: Remove obsolete MSVC version checks.
[SVN r85929]
2013-09-26 09:39:50 +00:00
Peter Dimov 82e178f043 Avoid stack overflow in make_shared. Refs #4256.
[SVN r83198]
2013-02-28 08:02:09 +00:00
Glen Fernandes 46d119c385 Identifier renaming in allocate_array_helper, array_deleter, make_array_helper
function parameters to satisfy higher warning levels.

[SVN r82971]
2013-02-18 09:33:18 +00:00
Glen Fernandes 32a28ec462 Support BOOST_NO_EXCEPTIONS in detail/array_utility.hpp to allow use when exceptions are disabled
[SVN r82408]
2013-01-08 21:39:54 +00:00
Peter Dimov ef817e91d2 Replace std::nullptr_t with boost::detail::sp_nullptr_t.
[SVN r82351]
2013-01-04 15:41:13 +00:00
Peter Dimov e8be24c003 Untabify.
[SVN r82188]
2012-12-23 16:05:00 +00:00
Peter Dimov 647f67aabf Replace use of BOOST_HAS_RVALUE_REFS with !BOOST_NO_CXX11_RVALUE_REFERENCES.
[SVN r81900]
2012-12-13 16:48:57 +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
Peter Dimov fd52dbc411 Change make_shared to use the new _internal_get_untyped_deleter. Refs #6830.
[SVN r81860]
2012-12-11 18:21:29 +00:00
Glen Fernandes 6e269872df Explicitly name detail array construct overloads for different parameter types.
[SVN r81859]
2012-12-11 18:04:09 +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
Peter Dimov 8093967da7 Use explicit operator bool when available; add nullptr support to shared_ptr. Refs #4116.
[SVN r81780]
2012-12-08 00:51:59 +00:00
Glen Fernandes f390d9e265 Change ordering of overload definitions in array_utility.hpp
[SVN r81759]
2012-12-07 16:40:20 +00:00
Glen Fernandes ea22982865 Correctly use r-value reference semantics for Args and T in array utilities
[SVN r81752]
2012-12-07 07:42:42 +00:00
Glen Fernandes 09e77bc8df Optimization in initialization overload of array_construct for compilers to optimize it into the equivalent of a memset
[SVN r81750]
2012-12-07 06:45:26 +00:00
Glen Fernandes b3f2ebedbc Special case array construction for trivially default-constructible types and array destruction for trivially-destroyable types.
[SVN r81749]
2012-12-07 03:10:22 +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 2d3cc0db7d Update documentation and remove unused code.
[SVN r81703]
2012-12-04 11:21:24 +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 1adf546ddb Minor cosmetic change in detail array_deleter
[SVN r81685]
2012-12-03 05:56:17 +00:00
Glen Fernandes 5e5ff387fa For fixed size arrays upon constructor exception thrown destroy correctly.
[SVN r81684]
2012-12-03 05:41:34 +00:00