tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
next.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ITERATOR_NEXT_HPP
4#define TETL_ITERATOR_NEXT_HPP
5
8
9namespace etl {
10
13template <typename InputIt>
14[[nodiscard]] constexpr auto next(InputIt it, typename iterator_traits<InputIt>::difference_type n = 1) -> InputIt
15{
16 etl::advance(it, n);
17 return it;
18}
19
20} // namespace etl
21
22#endif // TETL_ITERATOR_NEXT_HPP
constexpr auto advance(It &it, Distance n) -> void
Increments given iterator it by n elements.
Definition advance.hpp:22
constexpr auto next(InputIt it, typename iterator_traits< InputIt >::difference_type n=1) -> InputIt
Return the nth successor of iterator it.
Definition next.hpp:14
Definition adjacent_find.hpp:8
iterator_traits is the type trait class that provides uniform interface to the properties of LegacyIt...
Definition iterator_traits.hpp:47