Re: Problem with <algorithm> transform
On Jan 6, 11:08 pm, Jerry Coffin <jcof...@taeus.com> wrote:
In article <lfagj.804$xA6.524@trndny09>, gerald.even...@verizon.mail
says...
Working on a Kubuntu 64bit system "c++ (GCC) 4.0.3".
The following simple program extracted from p.497 & 499 of N.M.Josurris'=
"The C++ Standard Library ... " (file t.cpp):
[ ... code elided ]
results in the following error output when executing 'c++ t.cpp'
The problem appears to be with your installation of gcc -- the
code is fine.
No it's not. Whether is will compiler or not is unspecified:
any C++ header may include any other, and if <locale> is
included, you should have a serious problem with template type
deduction for the call to std::transform. (From experience, g++
headers tend to include the world; when you develope under g++,
then port to other compilers, you very quickly get used to
having to add includes for headers you'd forgotten.)
Of course, even if it compiles, it has undefined behavior if
char is signed.
--
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