Treeview example iterator

This commit is contained in:
Markus Gans 2021-03-30 23:26:06 +02:00
parent 9df509dd3b
commit 4acca85a13
1 changed files with 8 additions and 6 deletions

View File

@ -191,11 +191,13 @@ class Treeview final : public finalcut::FDialog
struct Treeview::TreeItem
{
const char* const* begin() const
using const_iterator = const char* const*;
const_iterator begin() const noexcept
{ return &name; }
const char* const* end() const
{ return &density + 1; }
const_iterator end() const noexcept
{ return std::next(&density); }
// Data members
const char* name;