473,395 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C++ Templates

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

Jun 23 '07 #1
7 1566
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
Jun 23 '07 #2
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

Jun 24 '07 #3
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
Jun 24 '07 #4
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
Jun 24 '07 #5
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

Jun 24 '07 #6
On Jun 24, 12:20 pm, "Fraser Ross" <a...@b.comwrote:
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
Jun 25 '07 #7
On Jun 23, 1:30 pm, John Harrison <john_androni...@hotmail.comwrote:
[...]
In case anyone was wondering this is the book 'C++ Templates' byVandervoordeand Josuttis.
(A minor nit: It's "Vandevoorde" instead of "Vandervoorde".)

Cheers,

Daveed
Jun 25 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vince C. | last post by:
Hi all, I've created XML documents that are described with a schema. I'm using those documents to create web pages. All my web pages contain a fixed header and a variable document part. The...
5
by: Tom Alsberg | last post by:
Hi there... I'm recently trying to get a bit acquainted with XML Schemas and XSL. Now, I have a few questions about XSL stylesheets and templates: * Is there a way to "enter" a child element...
22
by: E. Robert Tisdale | last post by:
According to the C++ FAQ Lite: http://www.parashift.com/ What is "genericity"? Yet another way to say, "class templates." Not to be confused with "generality" (which just means avoiding...
12
by: Fabio De Francesco | last post by:
Hello. I can't understand why I can't compile the following simple code, where I think I have applied all the needed rules for templates that are declared and defined in different files (*.h and...
16
by: WittyGuy | last post by:
Hi, What is the major difference between function overloading and function templates? Thanks! http://www.gotw.ca/resources/clcm.htm for info about ]
2
by: jimbo_vr5 | last post by:
Hey I think i've figured out the idea behind apply-templates. But going through the tutorial on <http://www.w3schools.com/xsl/xsl_apply_templates.asp> theres simply just something that i dont...
25
by: Ted | last post by:
I'm putting the posts that follow here (hopefully they will follow here!) because they were rejected in comp.lang.c++.moderated. It behooves anyone reading them to first read the the thread of the...
28
by: NewToCPP | last post by:
Hi, I am just trying to find out if there is any strong reason for not using Templates. When we use Templates it is going to replicate the code for different data types, thus increasing the...
104
by: JohnQ | last post by:
Well apparently not since one can step thru template code with a debugger. But if I was willing to make the concession on debugging, templates would be strictly a precompiler thing? I have a...
7
by: Chris | last post by:
Hi All, This is a weird one but I am hoping someone can help or has some pointers, a recipe how to do the following: I have to move some code from c++ to objective-c and to do this I must...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.