MCPcopy Create free account
hub / github.com/GNOME/gjs / simple_struct_has_pointers

Function simple_struct_has_pointers

gi/gi-utils.cpp:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85template <InfoTag TAG>
86bool simple_struct_has_pointers(const UnownedInfo<TAG>& info) {
87 static_assert(TAG == InfoTag::STRUCT || TAG == InfoTag::UNION);
88
89 g_assert(struct_is_simple(info) &&
90 "Don't call simple_struct_has_pointers() on a non-simple struct");
91
92 typename UnownedInfo<TAG>::FieldsIterator fields = info.fields();
93 return std::any_of(
94 fields.begin(), fields.end(), [](const AutoFieldInfo& field) {
95 return direct_allocation_has_pointers(field.type_info());
96 });
97}
98
99template <InfoTag TAG>
100std::pair<Maybe<ConstructorIndex>, Maybe<ConstructorIndex>>

Callers 3

BoxedPrototypeMethod · 0.85

Calls 6

struct_is_simpleFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
fieldsMethod · 0.45
type_infoMethod · 0.45

Tested by

no test coverage detected