Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ Templates

Reply
Thread Tools

C++ Templates

 
 
Fraser Ross
Guest
Posts: n/a
 
      06-23-2007
If anyone has the book do you agree that on P439 there is a couple of
things saying the examples will cover 2 paramater pointers to functions
but the examples actually cover 3?

On P307 the only use of the <= operator must be wrong because the
program uses the < operator.

On 350 the footnote should also include CompoundT<T const &>.

None of this is on the erratta list online.

Fraser.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      06-23-2007
Fraser Ross wrote:
> If anyone has the book do you agree that on P439 there is a couple of
> things saying the examples will cover 2 paramater pointers to functions
> but the examples actually cover 3?
>
> On P307 the only use of the <= operator must be wrong because the
> program uses the < operator.
>
> On 350 the footnote should also include CompoundT<T const &>.
>
> None of this is on the erratta list online.
>
> Fraser.
>
>
>


The first template parameter is the function return type. So it doesn't
represent a function parameter. IOW The template has three parameters to
represent a pointer to a function which has two parameters (and one
return type).

john

In case anyone was wondering this is the book 'C++ Templates' by
Vandervoorde and Josuttis.

john
 
Reply With Quote
 
 
 
 
Fraser Ross
Guest
Posts: n/a
 
      06-24-2007
> The first template parameter is the function return type. So it
doesn't
> represent a function parameter. IOW The template has three parameters

to
> represent a pointer to a function which has two parameters (and one
> return type).


The classes cover 3 function parameters and a return type. The initial
writing says they will cover 2 function parameters. Also a declaration
of class FunctionPtr with the initial text covers 2 parameters. There
seems to have been a mix up somewhere.

I checked the missing partial specialisation on P350 with a couple of
compilers.

Fraser.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      06-24-2007
Fraser Ross wrote:
> If anyone has the book do you agree that on P439 there is a couple of
> things saying the examples will cover 2 paramater pointers to functions
> but the examples actually cover 3?
>
> On P307 the only use of the <= operator must be wrong because the
> program uses the < operator.
>
> On 350 the footnote should also include CompoundT<T const &>.
>
> None of this is on the erratta list online.
>
> Fraser.
>
>
>


Yes you are right. Probably it's a mistake because of where the page
break is.

john
 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      06-24-2007
John Harrison wrote:
> Fraser Ross wrote:
>> If anyone has the book do you agree that on P439 there is a couple of
>> things saying the examples will cover 2 paramater pointers to functions
>> but the examples actually cover 3?
>>
>> On P307 the only use of the <= operator must be wrong because the
>> program uses the < operator.
>>
>> On 350 the footnote should also include CompoundT<T const &>.
>>
>> None of this is on the erratta list online.
>>
>> Fraser.
>>
>>
>>

>
> Yes you are right. Probably it's a mistake because of where the page
> break is.
>
> john


Why not email the author? I once emailed Josuttis above an error and he
responded very quickly. And he didn't mind that I'd bugged him with an
error that turned out not to be an error at all.

john
 
Reply With Quote
 
Fraser Ross
Guest
Posts: n/a
 
      06-24-2007
> Why not email the author? I once emailed Josuttis above an error and
he
> responded very quickly. And he didn't mind that I'd bugged him with an
> error that turned out not to be an error at all.


I've not had any response recently. Theres a typo on P447 similar to
the one on P448.

Fraser.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
vandevoorde@gmail.com
Guest
Posts: n/a
 
      06-25-2007
On Jun 24, 12:20 pm, "Fraser Ross" <(E-Mail Removed)> wrote:
> > Why not email the author? I once emailed Josuttis above an error and

> he
> > responded very quickly. And he didn't mind that I'd bugged him with an
> > error that turned out not to be an error at all.

>
> I've not had any response recently.


Sorry about that. I generally cannot keep up with all the e-mails
coming in. I do appreciate the reports, however. (And replied to
your latest messages some minutes ago.)

Thanks again,

Daveed


 
Reply With Quote
 
vandevoorde@gmail.com
Guest
Posts: n/a
 
      06-25-2007
On Jun 23, 1:30 pm, John Harrison <(E-Mail Removed)> wrote:
[...]
> In case anyone was wondering this is the book 'C++ Templates' byVandervoordeand Josuttis.


(A minor nit: It's "Vandevoorde" instead of "Vandervoorde".)

Cheers,

Daveed


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Specializations of function Templates or Overloading Function templates with Templates ? recover C++ 2 07-25-2006 02:55 AM
Monster Templates - Question about Submitting Templates Fred HTML 1 09-26-2005 01:09 AM
Templates within templates Tom McCallum C++ 2 08-04-2004 04:44 PM
Templates templates templates JKop C++ 3 07-21-2004 11:44 AM
using templates in templates John Harrison C++ 8 07-31-2003 12:00 PM



Advertisments