Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!clarkson!grape.ecs.clarkson.edu!cline From: cline@cheetah.ece.clarkson.edu (Marshall Cline) Newsgroups: comp.lang.c++ Subject: Re: Errata list for Lippman's C++ Primer Message-ID: Date: 20 Nov 90 23:10:19 GMT References: <1570@travis.csd.harris.com> Sender: @grape.ecs.clarkson.edu Reply-To: cline@sun.soe.clarkson.edu (Marshall Cline) Distribution: na Organization: (I don't speak for the) ECE Dept, Clarkson Univ, Potsdam, NY Lines: 74 In-Reply-To: brad@SSD.CSD.HARRIS.COM's message of 20 Nov 90 15:31:14 GMT In article <1570@travis.csd.harris.com> brad@SSD.CSD.HARRIS.COM (Brad Appleton) writes: >On a longshot - I was wondering if perhaps various readers of both Lippman's >text and of this newsgroup have their own personal(but not exhaustive) lists >of errors they have found. Stan Lippman posted this to comp.lang.c++ early this summer. I believe his book's recent printings don't contain some of these errors, however, so this list may be hopelessly out-of-date. Enjoy! Marshall Cline _____________________________________________________________________________ From: stan@kaiser.UUCP (s Lippman) Newsgroups: comp.lang.c++ Subject: Errata in C++ Primer Date: 19 Jun 89 16:15:16 GMT Organization: AT&T Bell Laboratories, Liberty Corner My ``C++ Primer'' is based on a draft of Bjarne's C++ Reference Manual (and matching in-house pre- release versions Release 2.0). Subsequent to the delivery of the manuscript a review of the language definition resulted in a few modifications. This impacts the book as follows: p.24 : the keyword ``handle'' is now replaced with ``catch'' (also page 430). p.40 : named enumerations now define unique integral types. For example: enum TestStatus { NOT_RUN=-1, FAIL, PASS }; enum Boolean { FALSE, TRUE }; main() { TestStatus test = NOT_RUN; Boolean found = FALSE; test = -1; // error: TestStatus = int test = 10; // error: TestStatus = int test = found; // error: TestStatus = Boolean test = FALSE; // error: TestStatus = const Boolean int st = test; // ok: implicit conversion } For compatibility, the cfront 2.0 issues warnings rather than errors. p. 159: Overloaded functions can now be distinquished by args of enum types: enum Bool { FALSE, TRUE } found; enum Stat { FAIL, PASS }; extern void ff( Bool ); extern void ff( Stat ); extern void ff( int ); ff( PASS ); // ff( Stat ) ff( 0 ); // ff( int ) ff( found ); // ff( Bool ) p. 264-265: Class instances of operator new and operator delete should define arguments of type ``size_t'' rather than of type long. As Andy Koenig pointed out, the current 2.0 implementation accepts the long argument and replaces it with that of size_t. The class instance of operator delete must return void. (There was a brief window when it was permitted to define an arbitrary return type -- this section was completed during this window.) p. 354: A virtual function invoked within either constructors OR destructor of a base class is resolved statically to the instance defined by the base class. (Thanks to Andy Koenig for pointing the destructor case.) These corrections will be reflected in a subsequent reprinting of the book. Stan Lippman AT&T Bell Laboratories _____________________________________________________________________________ -- PS: If your company is interested in on-site C++/OOD training, drop me a line! PPS: Career search in progress; ECE faculty; research oriented; will send vita. -- Marshall Cline / Asst.Prof / ECE Dept / Clarkson Univ / Potsdam, NY 13676 cline@sun.soe.clarkson.edu / Bitnet:BH0W@CLUTX / uunet!clutx.clarkson.edu!bh0w Voice: 315-268-3868 / Secretary: 315-268-6511 / FAX: 315-268-7600