MCPcopy Create free account
hub / github.com/PX4/eigen / destruct_elements_of_array

Function destruct_elements_of_array

Eigen/src/Core/util/Memory.h:255–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253 * The \a size parameters tells on how many objects to call the destructor of T.
254 */
255template<typename T> EIGEN_DEVICE_FUNC inline void destruct_elements_of_array(T *ptr, std::size_t size)
256{
257 // always destruct an array starting from the end.
258 if(ptr)
259 while(size) ptr[--size].~T();
260}
261
262/** \internal Constructs the elements of an array.
263 * The \a size parameter tells on how many objects to call the constructor of T.

Calls

no outgoing calls

Tested by

no test coverage detected