Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81886 - in trunk: boost/smart_ptr boost/smart_ptr/detail libs/smart_ptr libs/smart_ptr/test
From: glenfe_at_[hidden]
Date: 2012-12-12 23:04:25


Author: glenfe
Date: 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
New Revision: 81886
URL: http://svn.boost.org/trac/boost/changeset/81886

Log:
Use BOOST_NO_CXX11_RVALUE_REFERENCES and BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of the legacy macros. Rename identifiers of detail utility functions.
Text files modified:
   trunk/boost/smart_ptr/allocate_shared_array.hpp | 70 ++++++++++++++++++++--------------------
   trunk/boost/smart_ptr/detail/array_deleter.hpp | 56 ++++++++++++++++----------------
   trunk/boost/smart_ptr/detail/array_utility.hpp | 28 ++++++++--------
   trunk/boost/smart_ptr/make_shared_array.hpp | 68 +++++++++++++++++++-------------------
   trunk/libs/smart_ptr/make_shared_array.html | 22 ++++++------
   trunk/libs/smart_ptr/test/Jamfile.v2 | 8 ++--
   trunk/libs/smart_ptr/test/allocate_shared_array_create_test.cpp | 2
   trunk/libs/smart_ptr/test/allocate_shared_array_init_test.cpp | 22 ++++++------
   trunk/libs/smart_ptr/test/allocate_shared_array_test.cpp | 2
   trunk/libs/smart_ptr/test/allocate_shared_array_throws_test.cpp | 2
   trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp | 34 +++++++++---------
   trunk/libs/smart_ptr/test/allocate_shared_arrays_test.cpp | 2
   trunk/libs/smart_ptr/test/make_shared_array_create_test.cpp | 2
   trunk/libs/smart_ptr/test/make_shared_array_init_test.cpp | 22 ++++++------
   trunk/libs/smart_ptr/test/make_shared_array_test.cpp | 2
   trunk/libs/smart_ptr/test/make_shared_array_throws_test.cpp | 2
   trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp | 34 +++++++++---------
   trunk/libs/smart_ptr/test/make_shared_arrays_test.cpp | 2
   18 files changed, 190 insertions(+), 190 deletions(-)

Modified: trunk/boost/smart_ptr/allocate_shared_array.hpp
==============================================================================
--- trunk/boost/smart_ptr/allocate_shared_array.hpp (original)
+++ trunk/boost/smart_ptr/allocate_shared_array.hpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -33,10 +33,10 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2);
+ d2->init(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template<typename T, typename A, typename... Args>
     inline typename boost::detail::sp_if_array<T>::type
     allocate_shared(const A& allocator, std::size_t size, Args&&... args) {
@@ -51,7 +51,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<Args>(args)...);
+ d2->init_args(p2, boost::detail::sp_forward<Args>(args)...);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename A, typename... Args>
@@ -70,30 +70,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<Args>(args)...);
- return boost::shared_ptr<T>(s1, p1);
- }
-#endif
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- template<typename T, typename A>
- inline typename boost::detail::sp_if_array<T>::type
- allocate_shared(const A& allocator,
- std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
- typedef typename boost::detail::array_inner<T>::type T1;
- typedef typename boost::detail::array_base<T1>::type T2;
- typedef const T2 T3;
- T1* p1 = 0;
- T2* p2 = 0;
- T3* p3 = 0;
- std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
- boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
- boost::detail::array_deleter<T2[]> d1(n1);
- boost::shared_ptr<T> s1(p1, d1, a1);
- typedef boost::detail::array_deleter<T2[]>* D2;
- p3 = reinterpret_cast<T3*>(list.begin());
- p1 = reinterpret_cast<T1*>(p2);
- D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list(p2, p3);
+ d2->init_args(p2, boost::detail::sp_forward<Args>(args)...);
         return boost::shared_ptr<T>(s1, p1);
     }
 #endif
@@ -117,7 +94,7 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list(p2, p3);
+ d2->init_list(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename A>
@@ -141,7 +118,7 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list<M>(p2, p3);
+ d2->init_list<M>(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename A>
@@ -165,10 +142,33 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list<M>(p2, p3);
+ d2->init_list<M>(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator,
+ std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list.begin());
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template<typename T, typename A>
     inline typename boost::detail::sp_if_array<T>::type
     allocate_shared(const A& allocator, std::size_t size,
@@ -184,7 +184,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<T2>(value));
+ d2->init_value(p2, boost::detail::sp_forward<T2>(value));
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename A>
@@ -204,7 +204,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<T2>(value));
+ d2->init_value(p2, boost::detail::sp_forward<T2>(value));
         return boost::shared_ptr<T>(s1, p1);
     }
 #endif
@@ -223,7 +223,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_noinit(p2);
+ d2->noinit(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename A>
@@ -242,7 +242,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_noinit(p2);
+ d2->noinit(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
 }

Modified: trunk/boost/smart_ptr/detail/array_deleter.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_deleter.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_deleter.hpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -28,34 +28,34 @@
                     array_destroy(object, size);
                 }
             }
- void construct(T* memory) {
- array_construct(memory, size);
+ void init(T* memory) {
+ array_init(memory, size);
                 object = memory;
             }
-#if defined(BOOST_HAS_RVALUE_REFS)
- void construct(T* memory, T&& value) {
- array_construct_value(memory, size, sp_forward<T>(value));
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ void init_value(T* memory, T&& value) {
+ array_init_value(memory, size, sp_forward<T>(value));
                 object = memory;
             }
-#if defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
             template<typename... Args>
- void construct(T* memory, Args&&... args) {
- array_construct_args(memory, size, sp_forward<Args>(args)...);
+ void init_args(T* memory, Args&&... args) {
+ array_init_args(memory, size, sp_forward<Args>(args)...);
                 object = memory;
             }
 #endif
 #endif
- void construct_list(T* memory, const T* list) {
- array_construct_list(memory, size, list);
+ void init_list(T* memory, const T* list) {
+ array_init_list(memory, size, list);
                 object = memory;
             }
             template<std::size_t M>
- void construct_list(T* memory, const T* list) {
- array_construct_list<T, M>(memory, size, list);
+ void init_list(T* memory, const T* list) {
+ array_init_list<T, M>(memory, size, list);
                 object = memory;
             }
- void construct_noinit(T* memory) {
- array_construct_noinit(memory, size);
+ void noinit(T* memory) {
+ array_noinit(memory, size);
                 object = memory;
             }
             void operator()(const void*) {
@@ -79,34 +79,34 @@
                     array_destroy(object, N);
                 }
             }
- void construct(T* memory) {
- array_construct(memory, N);
+ void init(T* memory) {
+ array_init(memory, N);
                 object = memory;
             }
-#if defined(BOOST_HAS_RVALUE_REFS)
- void construct(T* memory, T&& value) {
- array_construct_value(memory, N, sp_forward<T>(value));
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ void init_value(T* memory, T&& value) {
+ array_init_value(memory, N, sp_forward<T>(value));
                 object = memory;
             }
-#if defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
             template<typename... Args>
- void construct(T* memory, Args&&... args) {
- array_construct_args(memory, N, sp_forward<Args>(args)...);
+ void init_args(T* memory, Args&&... args) {
+ array_init_args(memory, N, sp_forward<Args>(args)...);
                 object = memory;
             }
 #endif
 #endif
- void construct_list(T* memory, const T* list) {
- array_construct_list(memory, N, list);
+ void init_list(T* memory, const T* list) {
+ array_init_list(memory, N, list);
                 object = memory;
             }
             template<std::size_t M>
- void construct_list(T* memory, const T* list) {
- array_construct_list<T, M>(memory, N, list);
+ void init_list(T* memory, const T* list) {
+ array_init_list<T, M>(memory, N, list);
                 object = memory;
             }
- void construct_noinit(T* memory) {
- array_construct_noinit(memory, N);
+ void noinit(T* memory) {
+ array_noinit(memory, N);
                 object = memory;
             }
             void operator()(const void*) {

Modified: trunk/boost/smart_ptr/detail/array_utility.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_utility.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_utility.hpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -30,13 +30,13 @@
             array_destroy(memory, size, type);
         }
         template<typename T>
- inline void array_construct(T* memory, std::size_t size, boost::true_type) {
+ inline void array_init(T* memory, std::size_t size, boost::true_type) {
             for (std::size_t i = 0; i < size; i++) {
                 memory[i] = T();
             }
         }
         template<typename T>
- inline void array_construct(T* memory, std::size_t size, boost::false_type) {
+ inline void array_init(T* memory, std::size_t size, boost::false_type) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -49,13 +49,13 @@
             }
         }
         template<typename T>
- inline void array_construct(T* memory, std::size_t size) {
+ inline void array_init(T* memory, std::size_t size) {
             boost::has_trivial_default_constructor<T> type;
- array_construct(memory, size, type);
+ array_init(memory, size, type);
         }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
         template<typename T>
- inline void array_construct_value(T* memory, std::size_t size, T&& value) {
+ inline void array_init_value(T* memory, std::size_t size, T&& value) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -67,9 +67,9 @@
                 throw;
             }
         }
-#if defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
         template<typename T, typename... Args>
- inline void array_construct_args(T* memory, std::size_t size, Args&&... args) {
+ inline void array_init_args(T* memory, std::size_t size, Args&&... args) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -84,7 +84,7 @@
 #endif
 #endif
         template<typename T>
- inline void array_construct_list(T* memory, std::size_t size, const T* list) {
+ inline void array_init_list(T* memory, std::size_t size, const T* list) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -97,7 +97,7 @@
             }
         }
         template<typename T, std::size_t N>
- inline void array_construct_list(T* memory, std::size_t size, const T* list) {
+ inline void array_init_list(T* memory, std::size_t size, const T* list) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -110,10 +110,10 @@
             }
         }
         template<typename T>
- inline void array_construct_noinit(T*, std::size_t, boost::true_type) {
+ inline void array_noinit(T*, std::size_t, boost::true_type) {
         }
         template<typename T>
- inline void array_construct_noinit(T* memory, std::size_t size, boost::false_type) {
+ inline void array_noinit(T* memory, std::size_t size, boost::false_type) {
             std::size_t i = 0;
             try {
                 for (; i < size; i++) {
@@ -126,9 +126,9 @@
             }
         }
         template<typename T>
- inline void array_construct_noinit(T* memory, std::size_t size) {
+ inline void array_noinit(T* memory, std::size_t size) {
             boost::has_trivial_default_constructor<T> type;
- array_construct_noinit(memory, size, type);
+ array_noinit(memory, size, type);
         }
     }
 }

Modified: trunk/boost/smart_ptr/make_shared_array.hpp
==============================================================================
--- trunk/boost/smart_ptr/make_shared_array.hpp (original)
+++ trunk/boost/smart_ptr/make_shared_array.hpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -33,10 +33,10 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2);
+ d2->init(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template<typename T, typename... Args>
     inline typename boost::detail::sp_if_array<T>::type
     make_shared(std::size_t size, Args&&... args) {
@@ -51,7 +51,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<Args>(args)...);
+ d2->init_args(p2, boost::detail::sp_forward<Args>(args)...);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T, typename... Args>
@@ -70,29 +70,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<Args>(args)...);
- return boost::shared_ptr<T>(s1, p1);
- }
-#endif
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- template<typename T>
- inline typename boost::detail::sp_if_array<T>::type
- make_shared(std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
- typedef typename boost::detail::array_inner<T>::type T1;
- typedef typename boost::detail::array_base<T1>::type T2;
- typedef const T2 T3;
- T1* p1 = 0;
- T2* p2 = 0;
- T3* p3 = 0;
- std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
- boost::detail::make_array_helper<T2[]> a1(n1, &p2);
- boost::detail::array_deleter<T2[]> d1(n1);
- boost::shared_ptr<T> s1(p1, d1, a1);
- typedef boost::detail::array_deleter<T2[]>* D2;
- p3 = reinterpret_cast<T3*>(list.begin());
- p1 = reinterpret_cast<T1*>(p2);
- D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list(p2, p3);
+ d2->init_args(p2, boost::detail::sp_forward<Args>(args)...);
         return boost::shared_ptr<T>(s1, p1);
     }
 #endif
@@ -116,7 +94,7 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list(p2, p3);
+ d2->init_list(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T>
@@ -140,7 +118,7 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list<M>(p2, p3);
+ d2->init_list<M>(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T>
@@ -163,10 +141,32 @@
         p3 = reinterpret_cast<T3*>(list);
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_list<M>(p2, p3);
+ d2->init_list<M>(p2, p3);
         return boost::shared_ptr<T>(s1, p1);
     }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list.begin());
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template<typename T>
     inline typename boost::detail::sp_if_array<T>::type
     make_shared(std::size_t size,
@@ -182,7 +182,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<T2>(value));
+ d2->init_value(p2, boost::detail::sp_forward<T2>(value));
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T>
@@ -201,7 +201,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct(p2, boost::detail::sp_forward<T2>(value));
+ d2->init_value(p2, boost::detail::sp_forward<T2>(value));
         return boost::shared_ptr<T>(s1, p1);
     }
 #endif
@@ -220,7 +220,7 @@
         typedef boost::detail::array_deleter<T2[]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_noinit(p2);
+ d2->noinit(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
     template<typename T>
@@ -239,7 +239,7 @@
         typedef boost::detail::array_deleter<T2[N]>* D2;
         p1 = reinterpret_cast<T1*>(p2);
         D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
- d2->construct_noinit(p2);
+ d2->noinit(p2);
         return boost::shared_ptr<T>(s1, p1);
     }
 }

Modified: trunk/libs/smart_ptr/make_shared_array.html
==============================================================================
--- trunk/libs/smart_ptr/make_shared_array.html (original)
+++ trunk/libs/smart_ptr/make_shared_array.html 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -35,7 +35,7 @@
     template&lt;typename T, typename A&gt;
     shared_ptr&lt;T[]&gt; allocate_shared(const A&amp; allocator, size_t size);
     
-#if defined(BOOST_HAS_VARIADIC_TMPL) &amp;&amp; defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &amp;&amp; !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template&lt;typename T, typename... Args&gt;
     shared_ptr&lt;T[]&gt; make_shared(size_t size, Args&amp;&amp;... args);
 
@@ -48,15 +48,7 @@
     template&lt;typename T, typename A, typename... Args&gt;
     shared_ptr&lt;T[N]&gt; allocate_shared(const A&amp; allocator, Args&amp;&amp;... args);
 #endif
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- template&lt;typename T, typename... Args&gt;
- shared_ptr&lt;T[]&gt; make_shared(initializer_list&lt;T&gt; list);
-
- template&lt;typename T, typename A, typename... Args&gt;
- shared_ptr&lt;T[]&gt; allocate_shared(const A&amp; allocator, initializer_list&lt;T&gt; list);
-#endif
-
+
 #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
     template&lt;typename T, typename... Args&gt;
     shared_ptr&lt;T[N]&gt; make_shared(const T (&amp;list)[N]);
@@ -76,7 +68,15 @@
     template&lt;typename T, typename A, typename... Args&gt;
     shared_ptr&lt;T[M][N]&gt; allocate_shared(const A&amp; allocator, const T (&amp;list)[N]);
 
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ template&lt;typename T, typename... Args&gt;
+ shared_ptr&lt;T[]&gt; make_shared(initializer_list&lt;T&gt; list);
+
+ template&lt;typename T, typename A, typename... Args&gt;
+ shared_ptr&lt;T[]&gt; allocate_shared(const A&amp; allocator, initializer_list&lt;T&gt; list);
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     template&lt;typename T&gt;
     shared_ptr&lt;T[]&gt; make_shared(size_t size, T&amp;&amp; value);
 

Modified: trunk/libs/smart_ptr/test/Jamfile.v2
==============================================================================
--- trunk/libs/smart_ptr/test/Jamfile.v2 (original)
+++ trunk/libs/smart_ptr/test/Jamfile.v2 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -137,16 +137,16 @@
           [ run make_shared_array_test.cpp ]
           [ run make_shared_arrays_test.cpp ]
           [ run make_shared_array_create_test.cpp ]
- [ run make_shared_array_init_test.cpp ]
- [ run make_shared_arrays_create_test.cpp ]
+ [ run make_shared_array_init_test.cpp : : : <toolset>gcc:<cxxflags>-fno-deduce-init-list ]
+ [ run make_shared_arrays_create_test.cpp : : : <toolset>gcc:<cxxflags>-fno-deduce-init-list ]
           [ run make_shared_array_throws_test.cpp ]
           [ run make_shared_array_esft_test.cpp ]
           [ run make_shared_array_args_test.cpp ]
           [ run allocate_shared_array_test.cpp ]
           [ run allocate_shared_arrays_test.cpp ]
           [ run allocate_shared_array_create_test.cpp ]
- [ run allocate_shared_array_init_test.cpp ]
- [ run allocate_shared_arrays_create_test.cpp ]
+ [ run allocate_shared_array_init_test.cpp : : : <toolset>gcc:<cxxflags>-fno-deduce-init-list ]
+ [ run allocate_shared_arrays_create_test.cpp : : : <toolset>gcc:<cxxflags>-fno-deduce-init-list ]
           [ run allocate_shared_array_throws_test.cpp ]
           [ run allocate_shared_array_esft_test.cpp ]
           [ run allocate_shared_array_args_test.cpp ]

Modified: trunk/libs/smart_ptr/test/allocate_shared_array_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_array_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_array_create_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -36,7 +36,7 @@
 int type::instances = 0;
 
 int main() {
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[]> a1 = boost::allocate_shared<type[]>(std::allocator<type>(), 2, 1, 2, 3, 4, 5, 6, 7, 8, 9);

Modified: trunk/libs/smart_ptr/test/allocate_shared_array_init_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_array_init_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_array_init_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -20,65 +20,65 @@
 };
 
 int main() {
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
     {
- boost::shared_ptr<int[]> a1 = boost::allocate_shared<int[]>(std::allocator<int>(), { 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[]> a1 = boost::allocate_shared<const int[]>(std::allocator<int>(), { 0, 1, 2, 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::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);
         BOOST_TEST(a1[3].value == 3);
     }
     {
- boost::shared_ptr<const type[]> a1 = boost::allocate_shared<const type[]>(std::allocator<type>(), { 0, 1, 2, 3 });
+ boost::shared_ptr<const type[4]> a1 = boost::allocate_shared<const 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);
         BOOST_TEST(a1[3].value == 3);
     }
-#endif
-#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
     {
- boost::shared_ptr<int[4]> a1 = boost::allocate_shared<int[4]>(std::allocator<int>(), { 0, 1, 2, 3 });
+ boost::shared_ptr<int[]> a1 = boost::allocate_shared<int[]>(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::shared_ptr<const int[]> a1 = boost::allocate_shared<const int[]>(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::shared_ptr<type[]> a1 = boost::allocate_shared<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);
     }
     {
- boost::shared_ptr<const type[4]> a1 = boost::allocate_shared<const 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
+#endif
     return boost::report_errors();
 }

Modified: trunk/libs/smart_ptr/test/allocate_shared_array_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_array_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_array_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -73,7 +73,7 @@
         a1.reset();
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[]> a1 = boost::allocate_shared<type[]>(std::allocator<type>(), 3, 1, 5);

Modified: trunk/libs/smart_ptr/test/allocate_shared_array_throws_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_array_throws_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_array_throws_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -43,7 +43,7 @@
     } catch (...) {
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     try {
         boost::allocate_shared<type[6]>(std::allocator<type>());

Modified: trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -21,22 +21,6 @@
 };
 
 int main() {
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- {
- boost::shared_ptr<int[]> a1 = boost::allocate_shared<int[]>(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<int[][2]> a1 = boost::allocate_shared<int[][2]>(std::allocator<int>(), { {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
 #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
     {
         boost::shared_ptr<int[4]> a1 = boost::allocate_shared<int[4]>(std::allocator<int>(), {0, 1, 2, 3});
@@ -80,7 +64,23 @@
         BOOST_TEST(a1[1][1][0] == 2);
         BOOST_TEST(a1[1][1][1] == 3);
     }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ {
+ boost::shared_ptr<int[]> a1 = boost::allocate_shared<int[]>(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<int[][2]> a1 = boost::allocate_shared<int[][2]>(std::allocator<int>(), { {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
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     {
         boost::shared_ptr<type[]> a1 = boost::allocate_shared<type[]>(std::allocator<type>(), 4, {1, 2});
         BOOST_TEST(a1[0].x == 1);

Modified: trunk/libs/smart_ptr/test/allocate_shared_arrays_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_arrays_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_arrays_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -62,7 +62,7 @@
         a1.reset();
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[][2][2]> a1 = boost::allocate_shared<type[][2][2]>(std::allocator<type>(), 2, 1, 5);

Modified: trunk/libs/smart_ptr/test/make_shared_array_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_array_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_array_create_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -36,7 +36,7 @@
 int type::instances = 0;
 
 int main() {
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[]> a1 = boost::make_shared<type[]>(2, 1, 2, 3, 4, 5, 6, 7, 8, 9);

Modified: trunk/libs/smart_ptr/test/make_shared_array_init_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_array_init_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_array_init_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -20,65 +20,65 @@
 };
 
 int main() {
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
     {
- boost::shared_ptr<int[]> a1 = boost::make_shared<int[]>({ 0, 1, 2, 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);
     }
     {
- boost::shared_ptr<const int[]> a1 = boost::make_shared<const int[]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<const int[4]> a1 = boost::make_shared<const 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);
     }
     {
- boost::shared_ptr<type[]> a1 = boost::make_shared<type[]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<type[4]> a1 = boost::make_shared<type[4]>({ 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);
     }
     {
- boost::shared_ptr<const type[]> a1 = boost::make_shared<const type[]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<const type[4]> a1 = boost::make_shared<const type[4]>({ 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
-#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
     {
- boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<int[]> a1 = boost::make_shared<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::make_shared<const int[4]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<const int[]> a1 = boost::make_shared<const 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::make_shared<type[4]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<type[]> a1 = boost::make_shared<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);
     }
     {
- boost::shared_ptr<const type[4]> a1 = boost::make_shared<const type[4]>({ 0, 1, 2, 3 });
+ boost::shared_ptr<const type[]> a1 = boost::make_shared<const 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
+#endif
     return boost::report_errors();
 }

Modified: trunk/libs/smart_ptr/test/make_shared_array_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_array_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_array_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -73,7 +73,7 @@
         a1.reset();
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[]> a1 = boost::make_shared<type[]>(3, 1, 5);

Modified: trunk/libs/smart_ptr/test/make_shared_array_throws_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_array_throws_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_array_throws_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -43,7 +43,7 @@
     } catch (...) {
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     try {
         boost::make_shared<type[6]>();

Modified: trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -21,22 +21,6 @@
 };
 
 int main() {
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- {
- boost::shared_ptr<int[]> a1 = boost::make_shared<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<int[][2]> a1 = boost::make_shared<int[][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
 #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
     {
         boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({0, 1, 2, 3});
@@ -80,7 +64,23 @@
         BOOST_TEST(a1[1][1][0] == 2);
         BOOST_TEST(a1[1][1][1] == 3);
     }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ {
+ boost::shared_ptr<int[]> a1 = boost::make_shared<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<int[][2]> a1 = boost::make_shared<int[][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
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     {
         boost::shared_ptr<type[]> a1 = boost::make_shared<type[]>(4, {1, 2});
         BOOST_TEST(a1[0].x == 1);

Modified: trunk/libs/smart_ptr/test/make_shared_arrays_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_arrays_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_arrays_test.cpp 2012-12-12 23:04:23 EST (Wed, 12 Dec 2012)
@@ -62,7 +62,7 @@
         a1.reset();
         BOOST_TEST(type::instances == 0);
     }
-#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
     BOOST_TEST(type::instances == 0);
     {
         boost::shared_ptr<type[][2][2]> a1 = boost::make_shared<type[][2][2]>(2, 1, 5);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk