diff options
Diffstat (limited to 'libs/smart_ptr/test/allocate_shared_arrays_test.cpp')
-rw-r--r-- | libs/smart_ptr/test/allocate_shared_arrays_test.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/smart_ptr/test/allocate_shared_arrays_test.cpp b/libs/smart_ptr/test/allocate_shared_arrays_test.cpp index a088a223b6..a23930c794 100644 --- a/libs/smart_ptr/test/allocate_shared_arrays_test.cpp +++ b/libs/smart_ptr/test/allocate_shared_arrays_test.cpp @@ -5,11 +5,12 @@ Copyright 2012-2015 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) #include <boost/core/lightweight_test.hpp> #include <boost/smart_ptr/make_shared.hpp> -#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) -template<class T> +template<class T = void> struct creator { typedef T value_type; @@ -66,8 +67,7 @@ int main() } { boost::shared_ptr<const int[][2]> result = - boost::allocate_shared<const - int[][2]>(creator<int>(), 2, {0, 1}); + boost::allocate_shared<const int[][2]>(creator<>(), 2, {0, 1}); BOOST_TEST(result[0][0] == 0); BOOST_TEST(result[0][1] == 1); BOOST_TEST(result[1][0] == 0); @@ -75,8 +75,7 @@ int main() } { boost::shared_ptr<const int[2][2]> result = - boost::allocate_shared<const - int[2][2]>(creator<int>(), {0, 1}); + boost::allocate_shared<const int[2][2]>(creator<>(), {0, 1}); BOOST_TEST(result[0][0] == 0); BOOST_TEST(result[0][1] == 1); BOOST_TEST(result[1][0] == 0); |