Re: Reading from fstream into vector
On Sep 18, 11:53 am, Ian Collins <ian-n...@hotmail.com> wrote:
James Kanze wrote:
On Sep 18, 8:07 am, Ian Collins <ian-n...@hotmail.com> wrote:
D. Susman wrote:
You need to include <iterator> for std::istream_iterator.
Thanks for the advice, but it still does not compile. I
think it's something about the CC compiler. With g++ 3.4.3,
the compiles just fine.
What can it be about CC which refrains the code from being
compiled?
<OT>The default standard library is missing template member functions,
compile with -library=stlport4</OT>
Which is buggy almost to the point of being unusable, and may
not be compatible with third party libraries.
Not buggy, just old.
Which, the STL port, or the Rogue Wave version of the library
they use by default?
They released it before the compiler supported template member
functions in class templates. They were then stuck with ABI
backwards compatibility and so the STLPort library was added.
My experience is that 1) the Rogue Wave library is old, as you
say. It also has one or two very serious bugs (like
systematically writing one beyond the end of an array), and has
very, very serious performance problems. The STL port is more
up to date, and doesn't have the performance problems (or more
accurately, I've not encountered them, perhaps because we don't
use it in production), but has even more bugs than the Rogue
Wave library. Neither begin to come close to Dinkumware, or
recent versions of g++, in quality.
(If you aren't
concerned about compatibity with third party libraries, of
course, then g++ works quite well: the compiler is somewhat
better than Sun CC to begin with, and the library is an order of
magnitude better than either of the libraries provided with Sun
CC.
Not in my experience but that's off topic.
For many years, I swore by Sun CC. It was my reference
compiler. But at some point, Sun obviously decided to put all
their resources behind Java, and let C++ just ride. I think
(from things people I know at Sun have said) that in the last
year or two they've revised this again, and are trying to make a
competative C++ compiler, but they've still got some catching up
to do. We use Sun CC (with its default library) when we have to
link with third party libraries, because that's what they used
when compiling the library. We tend to use g++ otherwise. (And
of course, on our Linux platforms, it's all g++. And Windows is
VC++, but those are generally different applications.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34