On Apr 3, 6:21 pm, red floyd <redfl...@gmail.com> wrote:
> On Apr 3, 3:38 am, "gautamcoo...@gmail.com" <gautamcoo...@gmail.com>
> wrote:
> > I read in Boost C++ docs that the result of a deference on a
> > model of Forward Iterator is T&, where T is the value type
> > of the model of Forward Iterator. But I could not find the
> > same statement in the SGI STL specification of Forward
> > Iterator. Can anyone kindly point it out to me?
> It doesn't matter what the SGI spec says. It only matters
> what the Standard says.
> Table 74 in 24.1.3 of ISO/IEC 14882:2003 specifies that *a has
> return type T&.
There's also a requirement that if a and b are iterators, and a
== b, that *a and *b refer to the same object, i.e. that &*a ==
&*b. Which is really too restrictive in the case of
non-mutating iterators.
--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
|