forked from boostorg/smart_ptr
Update allocate_shared array unit tests
Tests that do not always use allocator bound for element_type.
This commit is contained in:
1 parent
eb8aa36854
commit
6cbc1e6775
8 files changed
+51
-51
No files matched your search
@@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/smart_ptr/enable_shared_from_this.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
|
||||
template<class T>
|
||||
template<class T = void>
|
||||
struct creator {
|
||||
typedef T value_type;
|
||||
|
||||
@@ -82,7 +82,7 @@ int main()
|
||||
BOOST_TEST(type::instances == 0);
|
||||
{
|
||||
boost::shared_ptr<type[]> result =
|
||||
boost::allocate_shared_noinit<type[]>(creator<type>(), 3);
|
||||
boost::allocate_shared_noinit<type[]>(creator<>(), 3);
|
||||
try {
|
||||
result[0].shared_from_this();
|
||||
BOOST_ERROR("shared_from_this did not throw");
|
||||
|
||||
Reference in new issue
Block a user