Changeset 81750


Ignore:
Timestamp:
Dec 7, 2012, 6:45:26 AM (6 years ago)
Author:
Glen Fernandes
Message:

Optimization in initialization overload of array_construct for compilers to optimize it into the equivalent of a memset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/smart_ptr/detail/array_utility.hpp

    r81749 r81750  
    3838        inline void array_construct(T* memory, std::size_t size, boost::true_type) {
    3939            for (std::size_t i = 0; i < size; i++) {
    40                 void* p1 = memory + i;
    41                 ::new(p1) T();
     40                memory[i] = T();
    4241            }
    4342        }
Note: See TracChangeset for help on using the changeset viewer.