mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-23 21:01:51 +02:00
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:
@@ -18,6 +18,13 @@ int main() {
|
||||
BOOST_TEST(a1[1][0] == 2);
|
||||
BOOST_TEST(a1[1][1] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[2][2]> a1 = boost::make_shared<int[2][2]>({ {0, 1}, {2, 3} });
|
||||
BOOST_TEST(a1[0][0] == 0);
|
||||
BOOST_TEST(a1[0][1] == 1);
|
||||
BOOST_TEST(a1[1][0] == 2);
|
||||
BOOST_TEST(a1[1][1] == 3);
|
||||
}
|
||||
#endif
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user