Use std::span or iterator pairs for arguments instead of std::vector
johannesugb opened this issue · 0 comments
johannesugb commented
Currently within Auto-Vk and Gears-Vk, when a function/method supports multiple elements for one particular argument, that argument's type is std::vector
. That is bad, however, since users are forced to use std::vector
. Better: Use std::span
! Even better: use iterator pairs, just like the STL does, but the problem is that then everything must be templated, I guess. So, no need to change everything to templated code, but if possible at some place => do it!
Definition of done:
-
std::span<T>
is used for arguments instead ofstd::vector<T>
wherever the elements must be provided in contiguous memory (or if the affected code would have to be restructured too severely). - Pairs of iterators are used for arguments instead of
std::vector<T>
wherever it can be implemented in a straight-forward manner. -
std::vector<T>
is no longer used for passing arguments supporting 0..n elements - The coe is well documented and the Contribution Guidelines have been followed.