Add additional overload for make_shared and allocate_shared for arrays for fixed size arrays and initializer lists.

[SVN r81266]
This commit is contained in:
Glen Fernandes
2012-11-09 17:30:07 +00:00
parent fe06c120b9
commit 2731957b5b
8 changed files with 78 additions and 0 deletions

View File

@@ -118,6 +118,13 @@ int main() {
BOOST_TEST(a1[2] == 2);
BOOST_TEST(a1[3] == 3);
}
{
boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({ 0, 1, 2, 3 });
BOOST_TEST(a1[0] == 0);
BOOST_TEST(a1[1] == 1);
BOOST_TEST(a1[2] == 2);
BOOST_TEST(a1[3] == 3);
}
#endif
return boost::report_errors();
}