|
Boost Users : |
Subject: Re: [Boost-users] I search information about directory_iterator
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-02-16 06:54:08
On 16/02/2018 05:24, Andy wrote:
> How can I write something similar, but database iterator.
> I want get information from mySQL. The simplest way is add everything
> returning by select to vector of vector of string.
> But I prefer database iterator. How it write? How is in general
> directory_iterator as a iterator model?
http://en.cppreference.com/w/cpp/language/range-for
Essentially you need to return something that can have begin and end
called on it (either as free functions via ADL or as members).
And those need to return something that behaves like an iterator.
The rest is up to you.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net