Struct range_iterator

Synopsis

#include <include/flecs/addons/cpp/iter.hpp>

template <typename T>
struct range_iterator

Description

Iterate over an integer range (used to iterate over entity range).

Template Parameters

T - of the iterator

Methods

range_iterator
operator!=
operator*
operator++

Source

Lines 112-136 in include/flecs/addons/cpp/iter.hpp.

template <typename T>
struct range_iterator
{
    explicit range_iterator(T value)
        : m_value(value){}

    bool operator!=(range_iterator const& other) const
    {
        return m_value != other.m_value;
    }

    T const& operator*() const
    {
        return m_value;
    }

    range_iterator& operator++()
    {
        ++m_value;
        return *this;
    }

private:
    T m_value;
};