Skip to content

Conversation

wvpm
Copy link
Contributor

@wvpm wvpm commented Jul 29, 2025

Instead get_##NAME() returning a vector<T> const& it now returns a forwardable_span<const T>.
This ensures the collection is const, but if T is a pointer to a non-const type, the instance it points to is non-const.
This is required for #508 as it requires non-const instances to get data that may update a cache.
If desired, the forwardable_span return could be exposed as non-const with the vector<T> const& remaining as const variant.
That would result in different return types between const and non-const get_##NAME().

@wvpm wvpm added enhancement New feature or request topic:codestyle labels Jul 29, 2025
@Spartan322
Copy link
Member

When its not a reference, we do const T because that's the type.

@wvpm wvpm force-pushed the span_properties branch from d478955 to 28f0c5d Compare July 29, 2025 13:06
@wvpm wvpm enabled auto-merge July 29, 2025 13:18
@wvpm wvpm merged commit 756c20a into master Jul 29, 2025
16 checks passed
@Spartan322 Spartan322 deleted the span_properties branch July 29, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic:codestyle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants