Skip to content

Added iterator and const_iterator to etl::ipool #1043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rolandreichweinbmw
Copy link
Contributor

I have the use case of iterating over allocated chunks in pools. Therefore adding the respective iterators.

typedef typename etl::conditional<is_const, const ipool, ipool>::type pool_type;
typedef typename etl::conditional<is_const, const char* const*, char**>::type pointer_type;

ipool_iterator(const ipool_iterator& other):
Copy link
Contributor

Choose a reason for hiding this comment

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

The style used in the ETL is:-

ipool_iterator(const ipool_iterator& other)
  : p_current(other.p_current)
  , p_pool(other.p_pool)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just pushed an adjustment that fixes it.

@rolandreichweinbmw
Copy link
Contributor Author

This feature is already available in https://github.com/rolandreichweinbmw/etlplus

@jwellbelove jwellbelove changed the base branch from master to pull-request/#1043-Added-iterator-and-const_iterator-to-etl--ipool May 14, 2025 18:14
@jwellbelove jwellbelove merged commit 4204745 into ETLCPP:pull-request/#1043-Added-iterator-and-const_iterator-to-etl--ipool May 14, 2025
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants