Commit Graph

  • d42ce87557 Merged revision(s) 81780 from trunk: Use explicit operator bool when available; add nullptr support to shared_ptr. Fixes #4116. Peter Dimov 2012-12-11 18:35:21 +00:00
  • 67f5e9825e Add allocate_shared_noinit. Peter Dimov 2012-12-11 18:32:24 +00:00
  • fd52dbc411 Change make_shared to use the new _internal_get_untyped_deleter. Refs #6830. Peter Dimov 2012-12-11 18:21:29 +00:00
  • 6e269872df Explicitly name detail array construct overloads for different parameter types. Glen Fernandes 2012-12-11 18:04:09 +00:00
  • ecceb710de Add overloads of allocate_shared_noinit to complement make_shared_noinit Glen Fernandes 2012-12-11 17:42:47 +00:00
  • 9863467152 Correct link to http://www.stroustrup.com/wrapper.pdf in sp_techniques.html Glen Fernandes 2012-12-10 23:48:00 +00:00
  • b306c9751f Merged revision(s) 81748-81750,81752,81759,81782 from trunk: Refactoring in detail array_deleter before adding support for special-casing trivially default-constructible construction and trivially destroyable destruction. ........ Special case array construction for trivially default-constructible types and array destruction for trivially-destroyable types. ........ Optimization in initialization overload of array_construct for compilers to optimize it into the equivalent of a memset ........ Correctly use r-value reference semantics for Args and T in array utilities ........ Change ordering of overload definitions in array_utility.hpp ........ Convert function parameter for inner array size into template parameter and make identifiers in array_deleter consistent with those in array_utility ........ Glen Fernandes 2012-12-08 18:30:27 +00:00
  • 6b0d96af96 Convert function parameter for inner array size into template parameter and make identifiers in array_deleter consistent with those in array_utility Glen Fernandes 2012-12-08 05:25:50 +00:00
  • c03bfd0b4d Merged revision(s) 81730-81731, 81776 from trunk: Fix get_pointer for the array case, add operator= for unique_ptr, update auto_ptr signatures to use rvalue reference when available. ........ Update shared_ptr.htm. ........ Add more unique_ptr tests. ........ Peter Dimov 2012-12-08 00:57:04 +00:00
  • 8093967da7 Use explicit operator bool when available; add nullptr support to shared_ptr. Refs #4116. Peter Dimov 2012-12-08 00:51:59 +00:00
  • 7a4ad75f5d Add more unique_ptr tests. Peter Dimov 2012-12-07 22:42:56 +00:00
  • f390d9e265 Change ordering of overload definitions in array_utility.hpp Glen Fernandes 2012-12-07 16:40:20 +00:00
  • ea22982865 Correctly use r-value reference semantics for Args and T in array utilities Glen Fernandes 2012-12-07 07:42:42 +00:00
  • 09e77bc8df Optimization in initialization overload of array_construct for compilers to optimize it into the equivalent of a memset Glen Fernandes 2012-12-07 06:45:26 +00:00
  • b3f2ebedbc Special case array construction for trivially default-constructible types and array destruction for trivially-destroyable types. Glen Fernandes 2012-12-07 03:10:22 +00:00
  • 1209531fe0 Refactoring in detail array_deleter before adding support for special-casing trivially default-constructible construction and trivially destroyable destruction. Glen Fernandes 2012-12-07 01:53:35 +00:00
  • 6c2ed927e4 Update shared_ptr.htm. Peter Dimov 2012-12-06 03:20:46 +00:00
  • 7a733263da Fix get_pointer for the array case, add operator= for unique_ptr, update auto_ptr signatures to use rvalue reference when available. Peter Dimov 2012-12-06 03:18:54 +00:00
  • 08e5894510 Merged revisions 81700,81703 from trunk: Add overloads of make_shared and allocate_shared for arrays for E&& where E is typename boost::detail::array_base<T>::type ........ Update documentation and remove unused code. ........ Glen Fernandes 2012-12-05 04:28:20 +00:00
  • 3551d17566 Merged revision 81463 from trunk: Update shared_ptr casts. ........ Glen Fernandes 2012-12-05 04:13:51 +00:00
  • 32fe0b8f26 Merged revision(s) 81488 from trunk: Apply patch from #7722. Fixes #7722. Peter Dimov 2012-12-05 03:44:40 +00:00
  • 2d3cc0db7d Update documentation and remove unused code. Glen Fernandes 2012-12-04 11:21:24 +00:00
  • 188602581d Add overloads of make_shared and allocate_shared for arrays for E&& where E is typename boost::detail::array_base<T>::type Glen Fernandes 2012-12-04 06:06:23 +00:00
  • 88c2baa20b Merged revision(s) 81684-81685 from trunk: For fixed size arrays upon constructor exception thrown destroy correctly. ........ Minor cosmetic change in detail array_deleter ........ Glen Fernandes 2012-12-03 15:42:15 +00:00
  • 1adf546ddb Minor cosmetic change in detail array_deleter Glen Fernandes 2012-12-03 05:56:17 +00:00
  • 5e5ff387fa For fixed size arrays upon constructor exception thrown destroy correctly. Glen Fernandes 2012-12-03 05:41:34 +00:00
  • ea55019260 Merged revision(s) 81641-81643,81658,81669,81681 from trunk: Use const T (&)[N] for fixed size arrays instead of std::initializer<T> in overloads of make_shared and allocate_shared for arrays. ........ Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead for certain overloads of make_shared and allocate_shared ........ Code consistency: Use the same style of #if conditional compilation checks in allocate_shared_array.hpp and make_shared_array.hpp. ........ 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>. ........ Move two tests for allocate_shared and make_shared within check for BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX ........ Make specializations of detail array_deleter consistent. ........ Glen Fernandes 2012-12-02 23:15:55 +00:00
  • 500913db6d Make specializations of detail array_deleter consistent. Glen Fernandes 2012-12-02 22:05:31 +00:00
  • 19283a3548 Move two tests for allocate_shared and make_shared within check for BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX Glen Fernandes 2012-12-02 10:17:05 +00:00
  • 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>. Glen Fernandes 2012-12-01 22:43:57 +00:00
  • f5adfb0963 Code consistency: Use the same style of #if conditional compilation checks in allocate_shared_array.hpp and make_shared_array.hpp. Glen Fernandes 2012-12-01 05:40:06 +00:00
  • 8597433028 Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead for certain overloads of make_shared and allocate_shared Glen Fernandes 2012-12-01 05:23:37 +00:00
  • 4da0e2b7fc Use const T (&)[N] for fixed size arrays instead of std::initializer<T> in overloads of make_shared and allocate_shared for arrays. Glen Fernandes 2012-12-01 04:36:41 +00:00
  • 2346941b15 Merged revision(s) 81608-81610 from trunk: Optimization: Add specializations of make_array_helper, allocate_array_helper, and array_deleter for fixed size arrays to avoid storing size. ........ Consistent formatting across overloads of make_shared and allocate_shared (array forms). ........ More consistency in type parameters in helper details of allocate_shared and make_shared. ........ Glen Fernandes 2012-11-30 17:29:36 +00:00
  • 39ff002d2e More consistency in type parameters in helper details of allocate_shared and make_shared. Glen Fernandes 2012-11-28 07:32:30 +00:00
  • fceea2e584 Consistent formatting across overloads of make_shared and allocate_shared (array forms). Glen Fernandes 2012-11-28 06:26:50 +00:00
  • b17205ded7 Optimization: Add specializations of make_array_helper, allocate_array_helper, and array_deleter for fixed size arrays to avoid storing size. Glen Fernandes 2012-11-28 06:07:45 +00:00
  • d74c09dd5a Apply patch from #7722. Refs #7722. Peter Dimov 2012-11-22 17:39:27 +00:00
  • 97d32745aa Update shared_ptr casts. Peter Dimov 2012-11-21 17:43:48 +00:00
  • c7b6e56b30 Merged revision(s) 81368, 81399, 81407-81409, 81419, 81430-81431, 81437 from trunk: Apply BOOST_NOEXCEPT patch. Refs #7523. ........ Replace std::forward with detail::sp_forward. ........ Cosmetic changes in make_shared_array.hpp and allocate_shared_array.hpp ........ Documentation of make_shared_array: Minor corrections ........ Make make_shared_array.hpp and allocate_shared_array.hpp consistent with namespace qualification in rest of smart_ptr. ........ Update smart_ptr.htm with link to make_shared_array.htm which lists the many overloads of make_shared and allocate_shared for arrays. ........ Update documentation for make_shared and allocate_shared array forms. ........ Minor corrections in make_shared_array.html documentation. ........ Borland fixes. ........ Peter Dimov 2012-11-21 15:38:06 +00:00
  • 7835914d83 Borland fixes. Peter Dimov 2012-11-20 15:22:19 +00:00
  • 98b92fa83a Minor corrections in make_shared_array.html documentation. Glen Fernandes 2012-11-20 04:07:58 +00:00
  • 392885a56a Update documentation for make_shared and allocate_shared array forms. Glen Fernandes 2012-11-20 03:00:02 +00:00
  • b4594eab3b Update smart_ptr.htm with link to make_shared_array.htm which lists the many overloads of make_shared and allocate_shared for arrays. Glen Fernandes 2012-11-19 08:08:27 +00:00
  • ddfcc5f417 Make make_shared_array.hpp and allocate_shared_array.hpp consistent with namespace qualification in rest of smart_ptr. Glen Fernandes 2012-11-18 02:51:06 +00:00
  • 3f458c68f4 Documentation of make_shared_array: Minor corrections Glen Fernandes 2012-11-18 01:51:46 +00:00
  • 79b229adcd Cosmetic changes in make_shared_array.hpp and allocate_shared_array.hpp Glen Fernandes 2012-11-17 22:20:32 +00:00
  • 94b6487ca1 Replace std::forward with detail::sp_forward. Peter Dimov 2012-11-17 16:21:41 +00:00
  • cf769b94a7 Apply BOOST_NOEXCEPT patch. Refs #7523. Peter Dimov 2012-11-16 15:05:25 +00:00
  • 215771c83d Merged [81348] from trunk. Fixes #7693. Peter Dimov 2012-11-16 14:11:25 +00:00
  • 2805ae9362 Merged revision(s) 81341-81342 from trunk: Add additional overload for allocate_shared and make_shared array forms that take initializer list of T for the array types T[M][N] ........ Minor style change: Fix indentation in allocate_shared_array.hpp and make_shared_array.hpp ........ Peter Dimov 2012-11-16 14:09:18 +00:00
  • 7adb1cc1ec Reorder HP aCC and g++ #ifdefs. Refs #7693. Peter Dimov 2012-11-14 18:24:05 +00:00
  • da9524d637 Minor style change: Fix indentation in allocate_shared_array.hpp and make_shared_array.hpp Glen Fernandes 2012-11-14 15:33:30 +00:00
  • 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] Glen Fernandes 2012-11-14 15:18:50 +00:00
  • cb0797acf0 Merged revision(s) 81149, 81159, 81171, 81174, 81219-81220, 81222-81224, 81226, 81229-81239, 81242, 81253, 81257-81262, 81265-81268, 81271-81272, 81275-81277, 81299-81300 from trunk: Implement shared_ptr<X[]>, weak_ptr<X[]>. Refs #1113. ........ Fix shared_ptr<T[]> EDG issues. ........ Disable make_shared<T> overloads when T is Q[]. ........ Add catch(...) clauses to sp_array_test.cpp. ........ Add allocate_shared and make_shared for shared_ptr arrays of runtime size. Fulfills need for allocate_shared_array and make_shared_array. ........ Update Jamfile.v2 to run make_shared array tests and allocate_shared array tests. ........ Fix g++ issues. ........ Add specialization of sp_if_not_array<T[N]>. ........ Rename make_shared.hpp to make_shared_object.hpp, include from make_shared.hpp. ........ Add make_shared_array_args_test.cpp. ........ Add support for make_shared of array of arrays. Correctly destroy elements and construct elements for the variadic template constructor variants. ........ Fix sp_convertible<T const[], T const[]>. ........ Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case. ........ Rename sp_convertible_test.cpp to shared_ptr_convertible_test.cpp. ........ Don't treat array_helper create and create_noinit for array types as a special case. ........ Add sp_convertible_test.cpp. ........ Fix array_helper (create_noinit and use of args...). ........ Update allocate_shared and make_shared to treat multidimensional array as single dimension. Remove detail array_helper. Add detail array traits. Update tests. ........ Simplify array_deleter interface ........ Add missing semicolon. ........ Fix typo. ........ Add tests for variadic template constructors overload of array forms of make_shared and allocate_shared for multidimensional arrays and up to 9 constructor arguments. ........ Add support for shared_ptr<X[N>. ........ Add C++11 initializer list support for make_shared and allocate_shared array forms. Peter Dimov 2012-11-14 13:52:11 +00:00
  • e8103f9774 Merge from 57197, 57206, 57423, 57518 did not apply to 'libs' for some reason; update. Peter Dimov 2012-11-14 13:36:44 +00:00
  • 71eb435412 Merged revision(s) 57197, 57206, 57423, 57518 from trunk: Renamed enable_shared_from_this2 to enable_shared_from_raw and added shared_from_raw free function. These changes fix the pointer value in shared_ptr which were obtained before an external shared_ptr has taken ownership of the object (for example when a shared_ptr to this is obtained in an object's constructor). Peter Dimov 2012-11-14 13:26:30 +00:00
  • 4a2dad1574 Merged [81134] from trunk. Fixes #6308. Refs #6667. Peter Dimov 2012-11-14 12:09:30 +00:00
  • babc72757d Merged [81131] from trunk. Fixes #6625. Peter Dimov 2012-11-14 12:04:48 +00:00
  • c19cbc1892 Merged [81128] from trunk. Fixes #7141. Peter Dimov 2012-11-14 11:57:58 +00:00
  • d065e4d971 Merged [81127] from trunk. Fixes #6901. Peter Dimov 2012-11-14 11:55:10 +00:00
  • 777b86a661 Merged [81126] from trunk. Fixes #6996. Peter Dimov 2012-11-14 11:53:05 +00:00
  • aae5440854 Merged [80988] from trunk. Peter Dimov 2012-11-14 11:51:00 +00:00
  • 227d2e3255 Manually apply [69019] from trunk. Peter Dimov 2012-11-14 11:43:17 +00:00
  • 8bf183b373 Merged [81125] from trunk. Fixes #4185. Peter Dimov 2012-11-14 11:20:29 +00:00
  • 5017da2514 Merged [81119] from trunk. Fixes #7599. Peter Dimov 2012-11-14 11:17:48 +00:00
  • 3b0b10d06d Update Jamfile.v2 with two new smart_ptr tests for allocate_shared and make_shared Glen Fernandes 2012-11-11 19:21:18 +00:00
  • 25e11b20d3 Update tests for make_shared and allocate_shared array forms, for normal case, initializer lists, variadic template arguments, for arrays and fixed size arrays. Glen Fernandes 2012-11-11 19:14:50 +00:00
  • fa513340d7 Tidy long line formatting in allocate_shared_array.hpp and make_shared_array.hpp Glen Fernandes 2012-11-10 02:33:48 +00:00
  • 0e90213746 Change traits for initializer list for g++ Glen Fernandes 2012-11-10 02:17:02 +00:00
  • 980070e63f Add final overload of make_shared and allocate_shared (array forms) for T[][N] with C++11 initializer lists. Glen Fernandes 2012-11-10 01:33:29 +00:00
  • 5bdde37414 Updated shared_array to match shared_ptr. Refs #1113. Peter Dimov 2012-11-10 00:04:49 +00:00
  • 2aaa913b11 Keep old definition of sp_assert_convertible when BOOST_SP_NO_SP_CONVERTIBLE is set. Peter Dimov 2012-11-09 23:27:02 +00:00
  • 58a46f4e55 Add allocate_shared_array_args_test.cpp. Peter Dimov 2012-11-09 18:26:40 +00:00
  • 8cc50a5ce9 Add assertion to overload of make_shared and allocate_shared for T[N] with initializer lists. Rename detail type to be more intuitive. Glen Fernandes 2012-11-09 18:01:39 +00:00
  • 2731957b5b Add additional overload for make_shared and allocate_shared for arrays for fixed size arrays and initializer lists. Glen Fernandes 2012-11-09 17:30:07 +00:00
  • fe06c120b9 Add overloads to support fixed size arrays, T[N], to allocate_shared (variadic) and make_shared (variadic) and make_shared_noinit. Glen Fernandes 2012-11-09 17:12:56 +00:00
  • c1f41aa925 Actually remove test cases from make_shared_array_create_test.cpp and allocate_shared_array_create_test.cpp that g++ does not handle. Glen Fernandes 2012-11-09 16:35:18 +00:00
  • 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. Glen Fernandes 2012-11-09 16:06:48 +00:00
  • 999c284109 Disable make_shared for arrays when the compiler doesn't support partial specialization or SFINAE. Peter Dimov 2012-11-09 12:37:03 +00:00
  • d512eaaa0f Change make_shared and allocate_shared array form semantics with initializer lists overload that takes no size. Glen Fernandes 2012-11-09 10:14:55 +00:00
  • 730980f3ee Clean up code in allocate_shared_array.hpp and make_shared_array.hpp Glen Fernandes 2012-11-09 09:14:23 +00:00
  • 3d50db11b9 Add C++11 initializer list support for make_shared and allocate_shared array forms. Glen Fernandes 2012-11-09 06:17:05 +00:00
  • aa7562c3e5 Add support for shared_ptr<X[N>. Peter Dimov 2012-11-08 18:07:49 +00:00
  • c57245d710 Add tests for variadic template constructors overload of array forms of make_shared and allocate_shared for multidimensional arrays and up to 9 constructor arguments. Glen Fernandes 2012-11-08 05:33:52 +00:00
  • 945c013a12 Fix typo. Peter Dimov 2012-11-07 23:45:31 +00:00
  • df544871d7 Add missing semicolon. Peter Dimov 2012-11-07 23:41:52 +00:00
  • 89190ca17e Simplify array_deleter interface Glen Fernandes 2012-11-07 18:58:41 +00:00
  • 5d9312239c Update allocate_shared and make_shared to treat multidimensional array as single dimension. Remove detail array_helper. Add detail array traits. Update tests. Glen Fernandes 2012-11-07 18:37:17 +00:00
  • 93b5cace12 Fix array_helper (create_noinit and use of args...). Glen Fernandes 2012-11-07 15:36:15 +00:00
  • e50c849ab3 Add sp_convertible_test.cpp. Peter Dimov 2012-11-07 15:33:44 +00:00
  • dbea328b8b Don't treat array_helper create and create_noinit for array types as a special case. Glen Fernandes 2012-11-07 15:25:55 +00:00
  • c06ba497a3 Rename sp_convertible_test.cpp to shared_ptr_convertible_test.cpp. Peter Dimov 2012-11-07 15:07:08 +00:00
  • 734b5d1354 Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case. Glen Fernandes 2012-11-07 15:04:04 +00:00
  • 0467af1b83 Fix sp_convertible<T const[], T const[]>. Peter Dimov 2012-11-07 15:00:24 +00:00
  • dc5406aa5a Add support for make_shared of array of arrays. Correctly destroy elements and construct elements for the variadic template constructor variants. Glen Fernandes 2012-11-07 14:42:10 +00:00
  • 6e873de0fa Add make_shared_array_args_test.cpp. Peter Dimov 2012-11-06 17:31:15 +00:00
  • 322bcd7efa Rename make_shared.hpp to make_shared_object.hpp, include from make_shared.hpp. Peter Dimov 2012-11-06 16:29:56 +00:00
  • bb72e0a092 Add specialization of sp_if_not_array<T[N]>. Peter Dimov 2012-11-06 16:23:09 +00:00
  • d8eb2fc105 Fix g++ issues. Peter Dimov 2012-11-06 15:10:32 +00:00