Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/v/container/chunked_vector.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we static assert this in tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we static assert this in tests?

Yeah, I think there's some more to come, but I'm not full time on it.

Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,17 @@ class chunked_vector {
class iter {
public:
using iterator_category = std::random_access_iterator_tag;
using value_type = typename std::conditional_t<C, const T, T>;
using iterator_concept = std::random_access_iterator_tag;
using value_type = T;
using difference_type = std::ptrdiff_t;
using pointer
= std::conditional_t<std::is_same_v<T, bool>, bool, value_type*>;
using reference
= std::conditional_t<std::is_same_v<T, bool>, bool, value_type&>;
using pointer = std::conditional_t<
std::is_same_v<T, bool>,
bool,
std::conditional_t<C, const T*, T*>>;
using reference = std::conditional_t<
std::is_same_v<T, bool>,
bool,
std::conditional_t<C, const T&, T&>>;

iter() = default;

Expand Down
Loading