adapter: remove std::iterator due to deprecation

This commit is contained in:
Danny Robson 2022-07-25 11:57:29 +10:00
parent 77071e3334
commit 013fd2bb61

View File

@ -192,20 +192,16 @@ namespace cruft::adapter {
/// corresponds to the underlying iterator::value_type when
/// dereferenced.
template <size_t I, typename IteratorT>
struct scalar : public std::iterator<
typename std::iterator_traits<IteratorT>::iterator_category,
typename std::tuple_element<
struct scalar {
public:
using iterator_category = typename std::iterator_traits<IteratorT>::iterator_category;
using value_type = typename std::tuple_element<
I,
typename std::iterator_traits<
IteratorT
>::value_type
>::type,
typename std::iterator_traits<IteratorT>::difference_type
> {
public:
using inner_type = typename std::iterator_traits<IteratorT>::value_type;
using value_type = decltype (std::get<I> (std::declval<inner_type> ()));
>::type;
using difference_type = typename std::iterator_traits<IteratorT>::difference_type;
using reference = value_type&;
using const_reference = value_type const&;