mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-11-07 03:01:43 +01:00
Merged revision(s) 81858,81859,81865,81867 from trunk:
Add overloads of allocate_shared_noinit to complement make_shared_noinit ........ Explicitly name detail array construct overloads for different parameter types. ........ Use _internal_get_untyped_deleter in allocate_shared_array and make_shared_array ........ Documentation corrections: make_shared_array.html ........ [SVN r81882]
This commit is contained in:
@@ -38,5 +38,15 @@ int main() {
|
||||
BOOST_TEST(type::instances == 3);
|
||||
}
|
||||
}
|
||||
BOOST_TEST(type::instances == 0);
|
||||
{
|
||||
boost::shared_ptr<type[]> a1 = boost::allocate_shared_noinit<type[]>(std::allocator<type>(), 3);
|
||||
try {
|
||||
a1[0].shared_from_this();
|
||||
BOOST_ERROR("shared_from_this did not throw");
|
||||
} catch (...) {
|
||||
BOOST_TEST(type::instances == 3);
|
||||
}
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user