Boost logo

Boost Users :

Subject: Re: [Boost-users] transform_iterator requirement on the Iterator?
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-09-10 11:11:06


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Scott McMurray
> Sent: 10 September 2009 15:23
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] transform_iterator requirement on the Iterator?
>
> 2009/9/10 Hicham Mouline <hicham_at_[hidden]>:
> >
> > From the docs, I don't see the Iterator argument is required to be
> > default-constructible.
> >
>
> By Table 74 in the standard, all forward iterators are required to be
> default-constructible.
>
> I doubt you want your container iterators to be input iterators, and
> regardless, lower_bound requires forward iterators.
> _______________________________________________

My iterators are constructed to make them point inside a given container,
for that they store a reference to the container.
Therefore I cannot provide a default constructor, or can I?

Do I need to change the implementation of the iterator to allow default
construction
so that I can use lower_bound with it?


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