diff --git a/test/allocate_shared_array_construct_test.cpp b/test/allocate_shared_array_construct_test.cpp index 669e813..d3b81c3 100644 --- a/test/allocate_shared_array_construct_test.cpp +++ b/test/allocate_shared_array_construct_test.cpp @@ -11,7 +11,7 @@ Distributed under the Boost Software License, Version 1.0. #if !defined(BOOST_NO_CXX11_ALLOCATOR) struct allow { }; -template +template struct creator { typedef T value_type; @@ -100,7 +100,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 4); @@ -109,7 +109,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 4); @@ -118,7 +118,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 3); + boost::allocate_shared(creator<>(), 3); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 3); @@ -127,7 +127,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 3); @@ -136,7 +136,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 4); @@ -145,7 +145,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(type::instances == 4); diff --git a/test/allocate_shared_array_esft_test.cpp b/test/allocate_shared_array_esft_test.cpp index 0399c1a..1e0afaf 100644 --- a/test/allocate_shared_array_esft_test.cpp +++ b/test/allocate_shared_array_esft_test.cpp @@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -template +template struct creator { typedef T value_type; @@ -82,7 +82,7 @@ int main() BOOST_TEST(type::instances == 0); { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 3); + boost::allocate_shared_noinit(creator<>(), 3); try { result[0].shared_from_this(); BOOST_ERROR("shared_from_this did not throw"); diff --git a/test/allocate_shared_array_noinit_test.cpp b/test/allocate_shared_array_noinit_test.cpp index 644acd2..910d8f7 100644 --- a/test/allocate_shared_array_noinit_test.cpp +++ b/test/allocate_shared_array_noinit_test.cpp @@ -11,7 +11,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -template +template struct creator { typedef T value_type; @@ -98,7 +98,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 2); + boost::allocate_shared_noinit(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -106,7 +106,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -114,7 +114,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 3); + boost::allocate_shared_noinit(creator<>(), 3); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -122,7 +122,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -130,7 +130,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 2); + boost::allocate_shared_noinit(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -138,7 +138,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -170,7 +170,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 2); + boost::allocate_shared_noinit(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -182,7 +182,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -194,7 +194,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator(), 3); + boost::allocate_shared_noinit(creator<>(), 3); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -206,7 +206,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -219,7 +219,7 @@ int main() { boost::shared_ptr result = boost::allocate_shared_noinit(creator(), 2); + type[][2]>(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -231,7 +231,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), diff --git a/test/allocate_shared_array_test.cpp b/test/allocate_shared_array_test.cpp index 0369631..d2854f9 100644 --- a/test/allocate_shared_array_test.cpp +++ b/test/allocate_shared_array_test.cpp @@ -11,7 +11,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -template +template struct creator { typedef T value_type; @@ -104,7 +104,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -116,7 +116,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -128,7 +128,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 3); + boost::allocate_shared(creator<>(), 3); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -139,7 +139,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -150,7 +150,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -162,7 +162,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -198,7 +198,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -209,7 +209,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -220,7 +220,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 3); + boost::allocate_shared(creator<>(), 3); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -231,7 +231,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -242,7 +242,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2); + boost::allocate_shared(creator<>(), 2); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), @@ -253,7 +253,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_TEST(result.get() != 0); BOOST_TEST(result.use_count() == 1); BOOST_TEST(boost::alignment::is_aligned(result.get(), diff --git a/test/allocate_shared_array_throws_test.cpp b/test/allocate_shared_array_throws_test.cpp index 9857d18..dd674bb 100644 --- a/test/allocate_shared_array_throws_test.cpp +++ b/test/allocate_shared_array_throws_test.cpp @@ -8,7 +8,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -template +template struct creator { typedef T value_type; @@ -82,37 +82,37 @@ int main() BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_ERROR("allocate_shared did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared(creator()); + boost::allocate_shared(creator<>()); BOOST_ERROR("allocate_shared did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared_noinit(creator(), 6); + boost::allocate_shared_noinit(creator<>(), 6); BOOST_ERROR("allocate_shared_noinit did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared_noinit(creator(), 3); + boost::allocate_shared_noinit(creator<>(), 3); BOOST_ERROR("allocate_shared_noinit did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_ERROR("allocate_shared_noinit did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); } try { - boost::allocate_shared_noinit(creator()); + boost::allocate_shared_noinit(creator<>()); BOOST_ERROR("allocate_shared_noinit did not throw"); } catch (...) { BOOST_TEST(type::instances == 0); diff --git a/test/allocate_shared_array_value_test.cpp b/test/allocate_shared_array_value_test.cpp index 485c477..c0d67b9 100644 --- a/test/allocate_shared_array_value_test.cpp +++ b/test/allocate_shared_array_value_test.cpp @@ -8,7 +8,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -template +template struct creator { typedef T value_type; @@ -65,7 +65,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 4, 1); + boost::allocate_shared(creator<>(), 4, 1); BOOST_TEST(result[0] == 1); BOOST_TEST(result[1] == 1); BOOST_TEST(result[2] == 1); @@ -73,7 +73,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 1); + boost::allocate_shared(creator<>(), 1); BOOST_TEST(result[0] == 1); BOOST_TEST(result[1] == 1); BOOST_TEST(result[2] == 1); diff --git a/test/allocate_shared_arrays_test.cpp b/test/allocate_shared_arrays_test.cpp index 3c4f601..bcc16a2 100644 --- a/test/allocate_shared_arrays_test.cpp +++ b/test/allocate_shared_arrays_test.cpp @@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0. #include #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) -template +template struct creator { typedef T value_type; @@ -66,7 +66,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), 2, {0, 1}); + boost::allocate_shared(creator<>(), 2, {0, 1}); BOOST_TEST(result[0][0] == 0); BOOST_TEST(result[0][1] == 1); BOOST_TEST(result[1][0] == 0); @@ -74,7 +74,7 @@ int main() } { boost::shared_ptr result = - boost::allocate_shared(creator(), {0, 1}); + boost::allocate_shared(creator<>(), {0, 1}); BOOST_TEST(result[0][0] == 0); BOOST_TEST(result[0][1] == 1); BOOST_TEST(result[1][0] == 0); diff --git a/test/shared_ptr_alloc_construct11_test.cpp b/test/shared_ptr_alloc_construct11_test.cpp index 436f828..3ddabc8 100644 --- a/test/shared_ptr_alloc_construct11_test.cpp +++ b/test/shared_ptr_alloc_construct11_test.cpp @@ -14,7 +14,7 @@ struct counters { unsigned construct; }; -template +template class creator { public: typedef T value_type; @@ -101,7 +101,7 @@ int main() { counters state = { }; boost::shared_ptr pointer = - boost::allocate_shared(creator(&state), 5); + boost::allocate_shared(creator<>(&state), 5); BOOST_TEST(state.allocate == 1); BOOST_TEST(state.construct == 5); pointer.reset(); @@ -111,7 +111,7 @@ int main() { counters state = { }; boost::shared_ptr pointer = - boost::allocate_shared(creator(&state)); + boost::allocate_shared(creator<>(&state)); BOOST_TEST(state.allocate == 1); BOOST_TEST(state.construct == 5); pointer.reset();