iterator: minor changes

This commit is contained in:
Michele Caini
2021-12-17 16:43:59 +01:00
parent dc5450b95e
commit 534744d615

View File

@@ -65,7 +65,7 @@ struct iterable_adaptor final {
/*! @brief Iterator type. */
using iterator = It;
/*! @brief Const iterator type. */
using const_iterator = It;
using const_iterator = iterator;
/*! @brief Default constructor. */
iterable_adaptor() = default;
@@ -87,11 +87,6 @@ struct iterable_adaptor final {
return first;
}
/*! @copydoc begin */
[[nodiscard]] const_iterator cbegin() const ENTT_NOEXCEPT {
return begin();
}
/**
* @brief Returns an iterator to the end.
* @return An iterator to the element following the last element of the
@@ -101,6 +96,11 @@ struct iterable_adaptor final {
return last;
}
/*! @copydoc begin */
[[nodiscard]] const_iterator cbegin() const ENTT_NOEXCEPT {
return begin();
}
/*! @copydoc end */
[[nodiscard]] const_iterator cend() const ENTT_NOEXCEPT {
return end();