iterable_adaptor: constrain iterator types

This commit is contained in:
skypjack
2026-01-21 14:58:31 +01:00
parent 47a6a27378
commit 7d50da0463
2 changed files with 2 additions and 2 deletions

1
TODO
View File

@@ -38,4 +38,3 @@ TODO:
* hashed_string consteval-ness on construction to further reduce risks
* review sentinels (std::default_sentinel and the like)
* review non-const to const iterator conversions
* meta_base, then iterator.hpp

View File

@@ -1,6 +1,7 @@
#ifndef ENTT_CORE_ITERATOR_HPP
#define ENTT_CORE_ITERATOR_HPP
#include <concepts>
#include <iterator>
#include <memory>
#include <type_traits>
@@ -122,7 +123,7 @@ private:
* @tparam It Type of iterator.
* @tparam Sentinel Type of sentinel.
*/
template<typename It, typename Sentinel = It>
template<std::input_or_output_iterator It, std::sentinel_for<It> Sentinel = It>
struct iterable_adaptor final {
/*! @brief Value type. */
using value_type = std::iterator_traits<It>::value_type;