forked from boostorg/smart_ptr
Optimization in initialization overload of array_construct for compilers to optimize it into the equivalent of a memset
[SVN r81750]
This commit is contained in:
@ -37,8 +37,7 @@ namespace boost {
|
||||
template<typename T>
|
||||
inline void array_construct(T* memory, std::size_t size, boost::true_type) {
|
||||
for (std::size_t i = 0; i < size; i++) {
|
||||
void* p1 = memory + i;
|
||||
::new(p1) T();
|
||||
memory[i] = T();
|
||||
}
|
||||
}
|
||||
template<typename T>
|
||||
|
Reference in New Issue
Block a user