mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-18 10:25:25 +02:00
Merged revision(s) 81684-81685 from trunk:
For fixed size arrays upon constructor exception thrown destroy correctly. ........ Minor cosmetic change in detail array_deleter ........ [SVN r81695]
This commit is contained in:
@@ -43,5 +43,21 @@ int main() {
|
||||
} catch (...) {
|
||||
BOOST_TEST(type::instances == 0);
|
||||
}
|
||||
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
|
||||
BOOST_TEST(type::instances == 0);
|
||||
try {
|
||||
boost::allocate_shared<type[6]>(std::allocator<type>());
|
||||
BOOST_ERROR("allocate_shared did not throw");
|
||||
} catch (...) {
|
||||
BOOST_TEST(type::instances == 0);
|
||||
}
|
||||
BOOST_TEST(type::instances == 0);
|
||||
try {
|
||||
boost::allocate_shared<type[3][2]>(std::allocator<type>());
|
||||
BOOST_ERROR("allocate_shared did not throw");
|
||||
} catch (...) {
|
||||
BOOST_TEST(type::instances == 0);
|
||||
}
|
||||
#endif
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user