mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-21 20:05:25 +02:00
Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead for certain overloads of make_shared and allocate_shared
[SVN r81642]
This commit is contained in:
@@ -28,13 +28,6 @@ int main() {
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[4]> a1 = boost::allocate_shared<int[4]>(std::allocator<int>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0] == 0);
|
||||
BOOST_TEST(a1[1] == 1);
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[]> a1 = boost::allocate_shared<const int[]>(std::allocator<int>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0] == 0);
|
||||
@@ -42,13 +35,6 @@ int main() {
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[4]> a1 = boost::allocate_shared<const int[4]>(std::allocator<int>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0] == 0);
|
||||
BOOST_TEST(a1[1] == 1);
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<type[]> a1 = boost::allocate_shared<type[]>(std::allocator<type>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0].value == 0);
|
||||
@@ -57,14 +43,30 @@ int main() {
|
||||
BOOST_TEST(a1[3].value == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<type[4]> a1 = boost::allocate_shared<type[4]>(std::allocator<type>(), { 0, 1, 2, 3 });
|
||||
boost::shared_ptr<const type[]> a1 = boost::allocate_shared<const type[]>(std::allocator<type>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0].value == 0);
|
||||
BOOST_TEST(a1[1].value == 1);
|
||||
BOOST_TEST(a1[2].value == 2);
|
||||
BOOST_TEST(a1[3].value == 3);
|
||||
}
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
{
|
||||
boost::shared_ptr<const type[]> a1 = boost::allocate_shared<const type[]>(std::allocator<type>(), { 0, 1, 2, 3 });
|
||||
boost::shared_ptr<int[4]> a1 = boost::allocate_shared<int[4]>(std::allocator<int>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0] == 0);
|
||||
BOOST_TEST(a1[1] == 1);
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[4]> a1 = boost::allocate_shared<const int[4]>(std::allocator<int>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0] == 0);
|
||||
BOOST_TEST(a1[1] == 1);
|
||||
BOOST_TEST(a1[2] == 2);
|
||||
BOOST_TEST(a1[3] == 3);
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<type[4]> a1 = boost::allocate_shared<type[4]>(std::allocator<type>(), { 0, 1, 2, 3 });
|
||||
BOOST_TEST(a1[0].value == 0);
|
||||
BOOST_TEST(a1[1].value == 1);
|
||||
BOOST_TEST(a1[2].value == 2);
|
||||
|
Reference in New Issue
Block a user