File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
libcxx/test/std/ranges/range.adaptors/range.enumerate Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ struct RangeView : std::ranges::view_base {
2525 using Iterator = cpp20_input_iterator<int *>;
2626 using Sentinel = sentinel_wrapper<Iterator>;
2727
28- constexpr explicit RangeView (int * b, int * e) : begin_(b), end_(e) {}
28+ template <std::contiguous_iterator It>
29+ requires std::same_as<std::iter_value_t <It>, int >
30+ constexpr explicit RangeView (It b, It e) : begin_(std::to_address(b)), end_(std::to_address(e)) {}
2931 constexpr RangeView (RangeView const & other) : begin_(other.begin_), end_(other.end_), wasCopyInitialized(true ) {}
3032 constexpr RangeView (RangeView&& other) : begin_(other.begin_), end_(other.end_), wasMoveInitialized(true ) {}
3133 RangeView& operator =(RangeView const &) = default ;
You can’t perform that action at this time.
0 commit comments