Skip to content

Binding arrays very difficult to use #55

@marti4d

Description

@marti4d

Anvil::DescriptorSetGroup::set_binding_array_items() expects an array of BindingElementType values.

However - Due to some unfortunate design choices, creating such an array dynamically is very difficult. Since there is no default constructor and no copy constructor, the entire array must be initialized with known values upon creation. That's obviously not possible when the count isn't known until runtime.

So far, the only workaround I've got for this is to use placement new(), but that's really quite a pain.

Suggested fix is either to enable the default constructor and copy operator (being careful of the pitfalls of doing so with inheritance), or else change set_binding_array_items() to take an array of pointers instead so the objects can be created dynamically.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions