allocator size_type

Discussion in 'C++' started by Fraser Ross, Jul 31, 2003.

  1. Fraser Ross

    Fraser Ross Guest

    If anyone has the book Effective STL do you agree that the word value should
    be type on P51, 2nd paragraph from the bottom, in the sentence starting 'In
    both cases'. allocator's size_type is required to be size_t so why say it
    is typically a typedef for size_t?

    Fraser.
     
    Fraser Ross, Jul 31, 2003
    #1
    1. Advertising

  2. "Fraser Ross" <fraserATmembers.v21.co.unitedkingdom> wrote in message
    news:...
    > If anyone has the book Effective STL do you agree that the word value

    should
    > be type on P51, 2nd paragraph from the bottom, in the sentence starting

    'In
    > both cases'. allocator's size_type is required to be size_t so why say it
    > is typically a typedef for size_t?
    >
    > Fraser.
    >


    I don't have the book, but allocator's size_type is required to be size_t
    only in a STL compatible allocator. It isn't required to be size_t in
    general. Of course this begs the question of what would be the point of a
    non-STL compatible allocator.

    john
     
    John Harrison, Jul 31, 2003
    #2
    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. Kevin Goodsell

    size_type requirements

    Kevin Goodsell, Sep 12, 2003, in forum: C++
    Replies:
    1
    Views:
    527
    Josh Sebastian
    Sep 13, 2003
  2. Alex J. Dam

    size_type, pos_type, etc.

    Alex J. Dam, Jan 26, 2004, in forum: C++
    Replies:
    6
    Views:
    5,714
    Ron Natalie
    Jan 27, 2004
  3. Denis Remezov

    size_t and size_type

    Denis Remezov, Apr 1, 2004, in forum: C++
    Replies:
    9
    Views:
    19,153
    Pete Becker
    Apr 3, 2004
  4. Aaron
    Replies:
    6
    Views:
    1,461
  5. Replies:
    2
    Views:
    489
Loading...

Share This Page