Commit Graph
196 Commits
Author SHA1 Message Date
Peter Dimov e52905cf3c Add intrusive_ptr converting move assignment. 2016-05-17 18:43:41 +03:00
Peter Dimov b7f99ceba6 Update intrusive_ptr_move_test with converting move construction. 2016-05-17 18:36:50 +03:00
Peter Dimov 522f6c1869 Add more aliasing move test cases, add alias move reset 2016-04-13 14:31:43 +03:00
Peter Dimov cd8de9d4a6 Merge branch 'move-alias' of https://github.com/uecasm/smart_ptr into develop 2016-04-13 13:29:50 +03:00
Peter Dimov 4473bf8ec2 Fix hash support for shared_ptr<T[]>, <T[N]> 2015-12-15 19:13:20 +02:00
Glen Fernandes 7a7ac4512e Fix formatting in headers and tests 2015-11-11 01:26:15 -05:00
Glen Fernandes 38b6334e36 Update unit tests for make_shared/allocate_shared for arrays
Before pending refactor of make_shared and allocate_shared for arrays.
2015-11-09 22:35:34 -05:00
Glen Fernandes 7af503d3bb Refactor make_unique implementations
Before the pending refactor of make_shared/allocate_shared for arrays.
2015-11-08 11:02:06 -05:00
Gavin Lambert 05d5a4e9a0 Added shared_ptr aliasing move constructor.
Signed-off-by: Gavin Lambert <github@mirality.co.nz>
2015-10-12 18:19:22 +13:00
Peter Dimov d875a68ceb Add constructor/assignment taking boost::movelib::unique_ptr 2015-05-04 01:06:42 +03:00
Peter Dimov e067fd2cfd Fix comment. 2015-01-28 13:03:23 +02:00
Peter Dimov 711c36958a Add an additional weak_from_raw test. 2015-01-28 12:52:10 +02:00
Peter Dimov 7104e7dc7e Add weak_from_this. 2015-01-25 20:10:57 +02:00
Peter Dimov 3fd53ced83 Make shared_from_raw and weak_from_raw return consistent values in a constructor, regardless of order, as suggested by Gavin Lambert in #8. 2015-01-22 20:47:01 +02:00
Peter Dimov f65c57d9d2 Fix explicit instantiation regression 2014-11-12 19:04:29 +02:00
Peter Dimov 2a56c73924 Add weak_from_raw_test2.cpp. 2014-08-09 13:50:38 +03:00
Peter Dimov 720ce12a25 Add shared_from_raw_test6.cpp. 2014-08-09 13:42:51 +03:00
Peter Dimov de10be8560 Fix sp_nullptr_test for compilers that don't define std::nullptr_t. 2014-08-09 12:28:28 +03:00
Peter Dimov 6b562cb5b1 Rename enable_shared_from_raw_test.cpp to weak_from_raw_test.cpp. 2014-08-08 21:28:15 +03:00
Peter Dimov 3d2c230623 Rename esft_constructor_test.cpp to shared_from_raw_test5.cpp. 2014-08-08 21:24:20 +03:00
Peter Dimov bd4f9c239a Add shared_from_raw tests. 2014-08-06 21:07:52 +03:00
Peter Dimov b550e028f5 Move boost/memory_order.hpp to Boost.Atomic 2014-05-20 23:33:03 +03:00
Peter Dimov ed2eaddc5d Check BOOST_NO_CXX11_RVALUE_REFERENCES in tests that use std::unique_ptr. 2014-05-15 18:51:27 +03:00
Glen Fernandes 75add10b1d Simplify ms_allocator and as_allocator design 2014-02-28 10:19:50 -08:00
Peter Dimov dcfa031de7 Do not include sp_interlocked.hpp when not on Windows 2014-02-13 12:51:23 +02:00
Peter Dimov c003fba3a0 Renamed, cleaned up interlocked.hpp; added test 2014-02-12 20:48:35 +02:00
Glen Fernandes e1f170cd49 Drop variadic templates in unit test for VC11 2014-02-06 17:09:27 -08:00
Glen Fernandes 5008957bd0 Remove type2 tests in a_s_construct_test 2014-02-05 09:10:45 -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
Peter Dimov af5141d492 Merge commit 2014-02-05 00:32:36 +02:00
Peter Dimov 975d04ac62 Merge Jamfile.v2 on git's insistence 2014-02-05 00:29:18 +02:00
Peter Dimov 90e74511f7 Add support and tests for C++11 minimal allocators 2014-02-05 00:17:34 +02:00
Glen Fernandes f27b780724 Add unit test for allocate_shared construct case 2014-02-04 13:17:49 -08:00
Glen Fernandes aede0039bf make_unique tests run only for C++11 compilers 2014-01-31 11:01:37 -08:00
Glen Fernandes 72e5fb6fd7 Add fourth form of make_unique for objects
To support initialization syntax that Args&&... cannot forward perfectly.
2014-01-29 17:16: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 4de3f36839 Add add_ref parameter to intrusive_ptr::reset, add tests for reset. 2013-12-26 18:47:05 +02:00
Peter Dimov 4e46cb0609 Add one more intrusive_ptr test case. 2013-12-26 18:05:52 +02:00
Avi Kivity 73153d5797 Add intrusive_ptr<>::detach()
This provides a way to escape from automatic reference counting, and taking
manual control of the reference.  Useful when interfacing to a C API that
expects a pointer with an elevated reference count.

Similar to std::unique_ptr<>::release().
2013-12-26 17:47:28 +02:00
Peter Dimov a41b81f1c8 Added shared_array constructor from nullptr, per #8894. 2013-12-12 01:22:51 +02:00
Andrey Semashev 7b9354fcf3 Changed intrusive_ref_counter to follow CRTP design.
[SVN r85547]
2013-09-01 21:05:14 +00:00
Andrey Semashev a7d96b4762 Extracted intrusive_ref_counter from Boost.Log. The extracted version supports customizing the reference counter nature, two policies provided: thread_unsafe_counter and thread_safe_counter.
[SVN r85535]
2013-08-31 19:54:11 +00:00
Peter Dimov e8be24c003 Untabify.
[SVN r82188]
2012-12-23 16:05:00 +00:00
Glen Fernandes 66f34142be Fix cxxflags in smart_ptr/test/Jamfile.v2
[SVN r82070]
2012-12-18 09:24:31 +00:00
Glen Fernandes 63834f7233 Specify gcc-4.6 instead of gcc-4.6.3 for toolset
[SVN r82038]
2012-12-16 23:03:30 +00:00
Glen Fernandes bb700870c0 Specify <cxxflags>-fno-deduce-init-list for gcc-4.6.3 only.
[SVN r81950]
2012-12-14 20:05:03 +00: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