Minor cosmetic change in detail array_deleter

[SVN r81685]
This commit is contained in:
Glen Fernandes
2012-12-03 05:56:17 +00:00
parent 5e5ff387fa
commit 1adf546ddb

View File

@ -27,66 +27,66 @@ namespace boost {
destroy(size);
}
void construct(T* memory) {
object = memory;
for (std::size_t i = 0; i < size; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < size; i++) {
void* p1 = memory + i;
::new(p1) T();
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
template<typename... Args>
void construct(T* memory, Args&&... args) {
object = memory;
for (std::size_t i = 0; i < size; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < size; i++) {
void* p1 = memory + i;
::new(p1) T(args...);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
#endif
void construct_list(T* memory, const T* list) {
object = memory;
for (std::size_t i = 0; i < size; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < size; i++) {
void* p1 = memory + i;
::new(p1) T(list[i]);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void construct_list(T* memory, const T* list, std::size_t n) {
object = memory;
for (std::size_t i = 0; i < size; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < size; i++) {
void* p1 = memory + i;
::new(p1) T(list[i % n]);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void construct_noinit(T* memory) {
object = memory;
for (std::size_t i = 0; i < size; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < size; i++) {
void* p1 = memory + i;
::new(p1) T;
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void operator()(const void*) {
@ -114,66 +114,66 @@ namespace boost {
destroy(N);
}
void construct(T* memory) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < N; i++) {
void* p1 = memory + i;
::new(p1) T();
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
#if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
template<typename... Args>
void construct(T* memory, Args&&... args) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < N; i++) {
void* p1 = memory + i;
::new(p1) T(args...);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
#endif
void construct_list(T* memory, const T* list) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < N; i++) {
void* p1 = memory + i;
::new(p1) T(list[i]);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void construct_list(T* memory, const T* list, std::size_t n) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < N; i++) {
void* p1 = memory + i;
::new(p1) T(list[i % n]);
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void construct_noinit(T* memory) {
object = memory;
for (std::size_t i = 0; i < N; i++) {
try {
std::size_t i = 0;
try {
for (object = memory; i < N; i++) {
void* p1 = memory + i;
::new(p1) T;
} catch (...) {
destroy(i);
throw;
}
} catch (...) {
destroy(i);
throw;
}
}
void operator()(const void*) {