<commit_before>#ifndef ASTI_CONSTANT_ITER_HPP
#define ASTI_CONSTANT_ITER_HPP
#include <iterator>
namespace util {
template <typename T>
struct constant_iterator:
        std::iterator<std::input_iterator_tag, T>
{
    constant_iterator(T v_,std::ptrdiff_t idx_=0):
        v(v_), idx(idx_)
    {
    }
    constant_iterator(const constant_iterator&other)
        :v(other.v),idx(other.idx)
    {
    }

    T operator*() const
    {
        return v;
    }

    constant_iterator& operator+=(std::ptrdiff_t sz)
    {
        idx+=sz;
        return *this;
    }

    T operator[](size_t i)  const { return v;}

    constant_iterator& operator++()
    {   // pretend to preincrement
        ++idx;
        return (*this);
    }

    constant_iterator operator++(int)
    {   // pretend to postincrement
        constant_iterator tmp(*this);
        ++idx;
        return tmp;
    }
    constant_iterator& operator--()
    {   // pretend to preincrement
        --idx;
        return (*this);
    }

    constant_iterator operator--(int)
    {   // pretend to postincrement
        constant_iterator tmp(*this);
        --idx;
        return tmp;
    }
    T v;
    std::ptrdiff_t idx;
};

template <class T>
constant_iterator<T> operator+(constant_iterator<T>& it, std::ptrdiff_t sz) {
    constant_iterator<T> it_(it);
    it_+=sz;
    return it_;
}

template <class T>
bool
operator==(const constant_iterator<T>&it1, const constant_iterator<T>&it2)
{
    return std::make_pair(it1.v,it1.idx)==std::make_pair(it2.v,it2.idx);
}
template <class T>
bool
operator!=(const constant_iterator<T>&it1, const constant_iterator<T>&it2)
{
    return std::make_pair(it1.v,it1.idx)!=std::make_pair(it2.v,it2.idx);
}

template <class T>
constant_iterator<T>  make_constant_iterator( T v, std::ptrdiff_t idx=0) {
    return constant_iterator<T>(v, idx) ;
}
}

namespace std {
template<class T>
struct _Is_checked_helper<util::constant_iterator<T> >
    : public true_type
{   // mark constant_iterator as checked
};
}<commit_msg>Fix compiler errors<commit_after>#ifndef ASTI_CONSTANT_ITER_HPP
#define ASTI_CONSTANT_ITER_HPP
#include <iterator>
namespace util {
template <typename T>
struct constant_iterator:
        std::iterator<std::input_iterator_tag, T>
{
    constant_iterator(T v_,std::ptrdiff_t idx_=0):
        v(v_), idx(idx_)
    {
    }
    constant_iterator(const constant_iterator&other)
        :v(other.v),idx(other.idx)
    {
    }

    T operator*() const
    {
        return v;
    }

    constant_iterator& operator+=(std::ptrdiff_t sz)
    {
        idx+=sz;
        return *this;
    }

    T operator[](size_t i)  const { return v;}

    constant_iterator& operator++()
    {   // pretend to preincrement
        ++idx;
        return (*this);
    }

    constant_iterator operator++(int)
    {   // pretend to postincrement
        constant_iterator tmp(*this);
        ++idx;
        return tmp;
    }
    constant_iterator& operator--()
    {   // pretend to preincrement
        --idx;
        return (*this);
    }

    constant_iterator operator--(int)
    {   // pretend to postincrement
        constant_iterator tmp(*this);
        --idx;
        return tmp;
    }
    T v;
    std::ptrdiff_t idx;
};

template <class T>
constant_iterator<T> operator+(constant_iterator<T>& it, std::ptrdiff_t sz) {
    constant_iterator<T> it_(it);
    it_+=sz;
    return it_;
}

template <class T>
bool
operator==(const constant_iterator<T>&it1, const constant_iterator<T>&it2)
{
    return std::make_pair(it1.v,it1.idx)==std::make_pair(it2.v,it2.idx);
}
template <class T>
bool
operator!=(const constant_iterator<T>&it1, const constant_iterator<T>&it2)
{
    return std::make_pair(it1.v,it1.idx)!=std::make_pair(it2.v,it2.idx);
}

template <class T>
constant_iterator<T>  make_constant_iterator( T v, std::ptrdiff_t idx=0) {
    return constant_iterator<T>(v, idx) ;
}
}
#ifdef WIN32
//msvc checked iter
namespace std {
template<class T>
struct _Is_checked_helper<util::constant_iterator<T> >
    : public true_type
{   // mark constant_iterator as checked
};
}
#endif 
{'fraction_non_alphanumeric': 0.13205694648993618, 'fraction_numerical': 0.007363770250368188, 'mean_word_length': 3.103726082578046, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6513457', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1387, 'n_words': 282}