Add final overload of make_shared and allocate_shared (array forms) for T[][N] with C++11 initializer lists.

[SVN r81275]
This commit is contained in:
Glen Fernandes committed 2012-11-10 01:33:29 +00:00
1 parent 5bdde37414
commit 980070e63f
9 files changed
+115 -27

No files matched your search

@@ -39,12 +39,18 @@ namespace boost {
}
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void construct(T* memory, std::size_t count, const T* list) {
void construct_list(T* memory, std::size_t count, const T* list) {
for (object = memory; size < count; size++) {
void* p1 = object + size;
::new(p1) T(list[size]);
}
}
void construct_list(T* memory, std::size_t count, const T* list, std::size_t n) {
for (object = memory; size < count; size++) {
void* p1 = object + size;
::new(p1) T(list[size % n]);
}
}
#endif
void construct_noinit(T* memory, std::size_t count) {
for (object = memory; size < count; size++) {