diff --git a/include/boost/smart_ptr/allocate_shared_array.hpp b/include/boost/smart_ptr/allocate_shared_array.hpp index cb29bf6..89923c7 100644 --- a/include/boost/smart_ptr/allocate_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_shared_array.hpp @@ -14,6 +14,9 @@ #include #include #include +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) +#include +#endif namespace boost { template @@ -72,7 +75,7 @@ namespace boost { #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template inline typename detail::sp_if_array::type - allocate_shared(const A& allocator, typename detail::array_list::type list) { + allocate_shared(const A& allocator, std::initializer_list::type> list) { typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; typedef const T2 T3; @@ -92,7 +95,7 @@ namespace boost { } template inline typename detail::sp_if_size_array::type - allocate_shared(const A& allocator, typename detail::array_list::type list) { + allocate_shared(const A& allocator, std::initializer_list::type> list) { BOOST_ASSERT(list.size() == detail::array_size::size); typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; @@ -113,7 +116,7 @@ namespace boost { } template inline typename detail::sp_if_array::type - allocate_shared(const A& allocator, std::size_t size, typename detail::inner_list::type list) { + allocate_shared(const A& allocator, std::size_t size, std::initializer_list::type> list) { typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; typedef const T2 T3; diff --git a/include/boost/smart_ptr/detail/array_traits.hpp b/include/boost/smart_ptr/detail/array_traits.hpp index 14bdf01..068629a 100644 --- a/include/boost/smart_ptr/detail/array_traits.hpp +++ b/include/boost/smart_ptr/detail/array_traits.hpp @@ -10,9 +10,6 @@ #define BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP #include -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif namespace boost { namespace detail { @@ -56,26 +53,13 @@ namespace boost { struct array_inner { typedef T type; }; -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - template - struct array_list { + template + struct arrays_inner { }; - template - struct array_list { - typedef std::initializer_list type; + template + struct arrays_inner { + typedef T type; }; - template - struct array_list { - typedef std::initializer_list type; - }; - template - struct inner_list { - }; - template - struct inner_list { - typedef std::initializer_list type; - }; -#endif } } diff --git a/include/boost/smart_ptr/make_shared_array.hpp b/include/boost/smart_ptr/make_shared_array.hpp index 7cb9e7a..5329322 100644 --- a/include/boost/smart_ptr/make_shared_array.hpp +++ b/include/boost/smart_ptr/make_shared_array.hpp @@ -14,6 +14,9 @@ #include #include #include +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) +#include +#endif namespace boost { template @@ -72,7 +75,7 @@ namespace boost { #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template inline typename detail::sp_if_array::type - make_shared(typename detail::array_list::type list) { + make_shared(std::initializer_list::type> list) { typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; typedef const T2 T3; @@ -92,7 +95,7 @@ namespace boost { } template inline typename detail::sp_if_size_array::type - make_shared(typename detail::array_list::type list) { + make_shared(std::initializer_list::type> list) { BOOST_ASSERT(list.size() == detail::array_size::size); typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; @@ -113,7 +116,7 @@ namespace boost { } template inline typename detail::sp_if_array::type - make_shared(std::size_t size, typename detail::inner_list::type list) { + make_shared(std::size_t size, std::initializer_list::type> list) { typedef typename detail::array_inner::type T1; typedef typename detail::array_base::type T2; typedef const T2 T3;