MCPcopy Create free account
hub / github.com/HexHive/NASS / construct_type

Function construct_type

binderlib/include/utils/TypeHelpers.h:133–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 */
132
133template<typename TYPE> inline
134void construct_type(TYPE* p, size_t n) {
135 if (!traits<TYPE>::has_trivial_ctor) {
136 while (n > 0) {
137 n--;
138 new(p++) TYPE;
139 }
140 }
141}
142
143template<typename TYPE> inline
144void destroy_type(TYPE* p, size_t n) {

Callers 1

do_constructMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected