MCPcopy Create free account
hub / github.com/Singular/Singular / znew_array

Function znew_array

kernel/oswrapper/vspace.h:695–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693
694template <typename T>
695ZRef<T> znew_array(size_t n) {
696 ZRef<T> result = ZRef<T>::alloc();
697 T *ptr = result.as_ptr();
698 for (size_t i = 0; i < n; i++) {
699 new (ptr + i) T();
700 }
701 return result;
702}
703
704template <typename T>
705ZRef<T> znew_uninitialized_array(size_t n) {

Callers

nothing calls this directly

Calls 1

as_ptrMethod · 0.45

Tested by

no test coverage detected