|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81643 - in trunk: boost/smart_ptr boost/smart_ptr/detail libs/smart_ptr libs/smart_ptr/test
From: glenfe_at_[hidden]
Date: 2012-12-01 00:40:08
Author: glenfe
Date: 2012-12-01 00:40:06 EST (Sat, 01 Dec 2012)
New Revision: 81643
URL: http://svn.boost.org/trac/boost/changeset/81643
Log:
Code consistency: Use the same style of #if conditional compilation checks in allocate_shared_array.hpp and make_shared_array.hpp.
Text files modified:
trunk/boost/smart_ptr/allocate_shared_array.hpp | 2 +-
trunk/boost/smart_ptr/detail/array_deleter.hpp | 4 ----
trunk/boost/smart_ptr/make_shared_array.hpp | 2 +-
trunk/libs/smart_ptr/make_shared_array.html | 2 +-
trunk/libs/smart_ptr/test/allocate_shared_array_init_test.cpp | 2 +-
trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp | 2 +-
trunk/libs/smart_ptr/test/make_shared_array_init_test.cpp | 2 +-
trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp | 2 +-
8 files changed, 7 insertions(+), 11 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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -122,7 +122,7 @@
return boost::shared_ptr<T>(s1, p1);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
template<typename T, typename A>
inline typename boost::detail::sp_if_size_array<T>::type
allocate_shared(const A& allocator, const T& list) {
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -40,7 +40,6 @@
}
}
#endif
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void construct_list(T* memory, std::size_t count, const T* list) {
for (object = memory; size < count; size++) {
void* p1 = object + size;
@@ -53,7 +52,6 @@
::new(p1) T(list[size % n]);
}
}
-#endif
void construct_noinit(T* memory, std::size_t count) {
for (object = memory; size < count; size++) {
void* p1 = object + size;
@@ -98,7 +96,6 @@
}
}
#endif
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void construct_list(T* memory, const T* list) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
@@ -113,7 +110,6 @@
::new(p1) T(list[i % n]);
}
}
-#endif
void construct_noinit(T* memory) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -121,7 +121,7 @@
return boost::shared_ptr<T>(s1, p1);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
template<typename T>
inline typename boost::detail::sp_if_size_array<T>::type
make_shared(const T& list) {
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -63,7 +63,7 @@
shared_ptr<T[][N]> allocate_shared(const A& allocator, size_t size, initializer_list<T> list);
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
template<typename T, typename... Args>
shared_ptr<T[N]> make_shared(const T (&list)[N]);
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -50,7 +50,7 @@
BOOST_TEST(a1[3].value == 3);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#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 });
BOOST_TEST(a1[0] == 0);
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -40,7 +40,7 @@
BOOST_TEST(a1[1][1][1] == 3);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#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});
BOOST_TEST(a1[0] == 0);
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -50,7 +50,7 @@
BOOST_TEST(a1[3].value == 3);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{
boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({ 0, 1, 2, 3 });
BOOST_TEST(a1[0] == 0);
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-01 00:40:06 EST (Sat, 01 Dec 2012)
@@ -41,7 +41,7 @@
BOOST_TEST(a1[1][1][1] == 3);
}
#endif
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{
boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({0, 1, 2, 3});
BOOST_TEST(a1[0] == 0);
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