aui
aui copied to clipboard
aui::container adapt to aui::range
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<typename Iterator>
[[nodiscard]]
bool contains(Iterator begin, Iterator end, const typename std::iterator_traits<Iterator>::value_type& value) noexcept {
return std::find(begin, end, value) != end;
}
Expected (good):
template<typename Iterator>
[[nodiscard]]
bool contains(const typename std::iterator_traits<Iterator>::value_type& value) noexcept {
return std::find(begin(), end(), value) != end;
}