v1
Brett 2023-11-09 19:11:56 -05:00
parent da7627dd3b
commit e912e7e272
1 changed files with 17 additions and 2 deletions

View File

@ -106,7 +106,7 @@ namespace blt
struct range_itr struct range_itr
{ {
private: private:
const T current; T current;
public: public:
using iterator_category = std::bidirectional_iterator_tag; using iterator_category = std::bidirectional_iterator_tag;
using difference_type = T; using difference_type = T;
@ -163,7 +163,22 @@ namespace blt
template<typename T> template<typename T>
struct range struct range
{ {
private:
T _begin;
T _end;
public:
range(T begin, T end): _begin(begin), _end(end)
{}
range_itr<T> begin()
{
return range_itr{_begin};
}
range_itr<T> end()
{
return range_itr{_end};
}
}; };
template<typename V> template<typename V>