aui-framework / aui-framework/aui
aui::container adapt to aui::range
- Dominant language
- C++
- Stars
- 598
- Forks
- 44
- Avg merge
- 17h 56m
- Merged PRs (30d)
- 3
Description
At the moment, some of aui::container functions (`aui.core/src/AUI/Traits/containers.h`) accept `Iterator begin, Iterator end`. `aui::range` is designed for such situation, but weren't used here.
Also, some new methods for aui::range may be implemented. Maybe it's a very good idea to move all the functionality of aui::container namespace to aui::range methods (see example).
# Example
Currently (bad):
```
template
[[nodiscard]]
bool contains(Iterator begin, Iterator end, const typename std::iterator_traits::value_type& value) noexcept {
return std::find(begin, end, value) != end;
}
```
Expected (good):
```
template
[[nodiscard]]
bool contains(const typename std::iterator_traits::value_type& value) noexcept {
return std::find(begin(), end(), value) != end;
}
```
Contributor guide
Research direction
Start by reading aui.core/src/AUI/Traits/containers.h and locating the functions that take Iterator begin, Iterator end. Then inspect the existing aui::range API and inventory which container functionality could move there. Done means the agreed scope is migrated to range-based methods while preserving the shown contains behavior; the issue does not name tests or a narrower completion target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100