Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-05-17 03:08:02


"Victor A. Wagner, Jr." wrote:
>
> At Wednesday 2002/05/15 08:45, you wrote:
>
> > return !cont.empty() && ++cont.begin() == cont.end();
>
> As Scott Meyers points out in his "Effective STL", ++cont.begin() MAY NOT
> compile, depending on the implementation. That's a _serious_ drawback,
> IMO. Slow (for stupid compilers) beats not compiling any day.

I have to read this book. :-( If this is true, you are absolutely right
to use 'boost::next()'. But why doesn't it work? The only thing I could
think of is, that 'begin()' returns a 'const iterator&' or something
like that. Is this allowed? Or is there any other reason?

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk