C++ Templates

Discussion in 'C++' started by Fraser Ross, Jun 23, 2007.

  1. Fraser Ross

    Fraser Ross Guest

    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
    Fraser Ross, Jun 23, 2007
    #1
    1. Advertising

  2. 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
    John Harrison, Jun 23, 2007
    #2
    1. Advertising

  3. Fraser Ross

    Fraser Ross Guest

    > 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
    Fraser Ross, Jun 24, 2007
    #3
  4. 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
    John Harrison, Jun 24, 2007
    #4
  5. 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
    John Harrison, Jun 24, 2007
    #5
  6. Fraser Ross

    Fraser Ross Guest

    > 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
    Fraser Ross, Jun 24, 2007
    #6
  7. Fraser Ross

    Guest

    On Jun 24, 12:20 pm, "Fraser Ross" <> 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
    , Jun 25, 2007
    #7
  8. Fraser Ross

    Guest

    On Jun 23, 1:30 pm, John Harrison <> 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
    , Jun 25, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred
    Replies:
    1
    Views:
    597
    Neredbojias
    Sep 26, 2005
  2. John Harrison

    using templates in templates

    John Harrison, Jul 31, 2003, in forum: C++
    Replies:
    8
    Views:
    380
    Torsten Curdt
    Jul 31, 2003
  3. JKop
    Replies:
    3
    Views:
    468
  4. Tom McCallum

    Templates within templates

    Tom McCallum, Aug 4, 2004, in forum: C++
    Replies:
    2
    Views:
    365
    tom_usenet
    Aug 4, 2004
  5. recover
    Replies:
    2
    Views:
    802
    recover
    Jul 25, 2006
Loading...

Share This Page