From -9019315376816979203
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,11ee2d904ae7f0ff
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-05-29 05:31:34 PST
Path: bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!xlink.net!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!hf
From: hf@informatik.uni-karlsruhe.de (Harald Fuchs)
Newsgroups: comp.std.c++
Subject: Re: Errata in Stroustrup's new book
Date: 29 May 1994 11:02:17 GMT
Organization: Telematics Dept., Karlsruhe University, Germany
Lines: 59
Message-ID: <HF.94May29130217@faustino.informatik.uni-karlsruhe.de>
References: <HF.94May27141116@faustino.informatik.uni-karlsruhe.de>
	<CqHK01.IGn@world.std.com>
Reply-To: hf@tk.telematik.informatik.uni-karlsruhe.de
NNTP-Posting-Host: faustino.telematik.informatik.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
In-reply-to: miket@world.std.com's message of Sat, 28 May 1994 00:00:01 GMT
X-PGP-Public-Key: finger -l hf@faustino.telematik.informatik.uni-karlsruhe.de
X-PGP-Fingerprint: 09 4E C4 A2 B2 C5 33 1A  79 80 5D 39 BD 9B 89 39
X-Face: +X9WM4fq'W~kiz#%J_T\[o"W6$r~=>bUG3}]662E7^t)&e'X!i<80mK`#8_COdRHrEG'[sT
  i<DN@!?oL&8,,U0L9o%^$sh*mo`nY7%uri56H_1Ka{L+`XGq7iV[1];7H"&89-;PH)TricUmwsj]AK
  NtAw+L&FKto;o0N88D8O:YzU
X-WWW-Home-Page: http://www.telematik.informatik.uni-karlsruhe.de/~hf/

In article <2s5qs4$318@hpbab.mentorg.com>, davidr@wv.mentorg.com (David Ransier) writes:
> In article <HF.94May27141116@faustino.informatik.uni-karlsruhe.de>, hf@informatik.uni-karlsruhe.de (Harald Fuchs) writes:
> |> I think I found some errors in Stroustrup's new book "The Design and
> |> Evolution of C++", but I'm not quite sure.  Is there an errata list
> |> out there?

> Maybe, who is the publisher?

Addison-Wesley. ISBN 0-201-54330-3

In article <CqHK01.IGn@world.std.com>, miket@world.std.com (Michael Trachtman) writes:

> Why don't you email them to bs@research.att.com.

I somewhat hesitate to do that.  Firstly because I think he already
gets enough Email, and secondly because I'm not quite sure about what
I found.

Especially, I need some clarification about pp. 359f:

> template <class T> class basic_string {
>   // ...
> };

> template <class T, class C = CMP<T> >
> int compare (const basic_string<T>&, const basic_string<T>&);

> typedef basic_string<char> string;

> void f (string swede1, string swede2) {
>   compare (swede1, swede2);
>   compare (swede1, swede2, LITERATE);
> }

> I pass the comparison criteria as a template parameter because
> that's a way of passing several operations without imposing a
> run-time cost.

I think this contradicts with page 351:

> void g (Array<float>& a) {
>   f<float> (a);
>   f<double> (a);
>   f<Quad> (a);
> }

Thus page 351 indicates that you specify explicit function template
arguments with angle brackets, whereas the "compare" function above
seems to use an additional function argument for that. Shouldn't page
360 read

void f (string swede1, string swede2) {
  compare (swede1, swede2);
  compare<char, LITERATE> (swede1, swede2);
}

?
--
Harald Fuchs <hf@informatik.uni-karlsruhe.de>


