forked from boostorg/smart_ptr
Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case.
[SVN r81231]
This commit is contained in:
@ -13,6 +13,14 @@ namespace boost {
|
||||
namespace detail {
|
||||
template<typename T>
|
||||
struct array_helper {
|
||||
static void create(T& value) {
|
||||
void* p1 = &value;
|
||||
::new(p1) T();
|
||||
}
|
||||
static void create_noinit(T& value) {
|
||||
void* p1 = &value;
|
||||
::new(p1) T;
|
||||
}
|
||||
static void destroy(T& value) {
|
||||
value.~T();
|
||||
}
|
||||
|
Reference in New Issue
Block a user