iterable_adaptor: constrain iterator types
This commit is contained in:
1
TODO
1
TODO
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user