| 3579 | |
| 3580 | template<typename U> |
| 3581 | static inline U *create_array(size_t count) { |
| 3582 | assert(count > 0); |
| 3583 | auto p = static_cast<U *>((Traits::malloc)(sizeof(U) * count)); |
| 3584 | if (p == nullptr) { |
| 3585 | return nullptr; |
| 3586 | } |
| 3587 | |
| 3588 | for (size_t i = 0; i != count; ++i) { |
| 3589 | new(p + i) U(); |
| 3590 | } |
| 3591 | return p; |
| 3592 | } |
| 3593 | |
| 3594 | template<typename U> |
| 3595 | static inline void destroy_array(U *p, size_t count) { |
nothing calls this directly
no outgoing calls
no test coverage detected