ANN: Boost formal review start - Smart Container library

Discussion in 'C++' started by Pavol Droba, Sep 27, 2004.

  1. Pavol Droba

    Pavol Droba Guest

    Hello,

    Today starts the formal review of the Smart Container library, written
    by Thorsten Ottosen that will eventualy become a part of Boost
    (http://www.boost.org).

    If you find this interesting, your participation is welcome.

    Here is an invitation message as seen on the Boost mailing list:


    Hi all,

    The review of the Smart Container library, written by Thorsten Ottosen
    starts today (September 26th, 2004) and runs for 10 days (until
    October 5th, 2004).

    The latest version of the library can be found at

    http://boost-sandbox.sourceforge.net/smart_container.zip
    or
    http://groups.yahoo.com/group/boost/files/pointer container/smart_container.zip

    The package contains all you need to sucessfuly use the library with
    the Boost version 1.31 or later, however library tests require the
    latest Boost.Test, that is available from the main Boost CVS.


    What does the library provide? The library documentation states:

    >>>>>>>>>>>>>>>>


    Whenever a programmer wants to have a container of pointers to
    heap-allocated objects, there is usually only one
    exception-safe way: to make a container of smart pointers like
    boost::shared_ptr. This approach is suboptimal if

    1. the stored objects are not shared, but owned exclusively, or
    2. the overhead implied by smart pointers is inappropriate

    This library therefore provides standard-like containers that are for
    storing heap-allocated or cloned objects
    (or in case of a map, the mapped object must be a heap-allocated or
    cloned object). For each of the standard
    containers there is a smart container equivalent that takes ownership
    of the objects in an exception safe manner.
    In this respect the library is intended to solve the so-called
    polymorphic class problem.

    The advantages of smart containers are

    1. Exception-safe and fool proof pointer storage and manipulation.
    2. Notational convenience compared to the use of containers of
    pointers.
    3. Can be used for types that are neither Assignable nor Copy
    Constructible.
    4. No memory-overhead as containers of smart pointers can have (see
    11 and 12).
    5. Usually faster than using containers of smart pointers (see 11
    and 12).
    6. The interface is slightly changed towards the domain of pointers
    instead of relying on the
    normal value-based interface. For example, now it is possible
    for pop_back() to return the removed element.


    The disadvantages are

    1. Less flexible than containers of smart pointers

    <<<<<<<<<<<<<<<


    As an example of how the new containers look like, consider that

    <code>
    typedef boost::shared_ptr<Foo> foo_ptr;
    std::vector<foo_ptr> vec;
    vec.push_back( foo_ptr( new Foo ) );
    (*vec.begin())->bar();
    </code>

    now becomes

    <code>
    boost::ptr_vector<Foo> vec;
    vec.push_back( new Foo );
    vec.begin()->bar();
    </code>

    In your reviews, please include the answers for the following
    questions:

    * What is your evaluation of the design?
    * What is your evaluation of the implementation?
    * What is your evaluation of the documentation?
    * What is your evaluation of the potential usefulness of the
    library?
    * Did you try to use the library? With what compiler? Did you
    have any problems?
    * How much effort did you put into your evaluation? A glance? A
    quick reading? In-depth study?
    * Are you knowledgeable about the problem domain?

    And finally, every review should answer this question:

    * Do you think the library should be accepted as a Boost library?
    Be sure to say this explicitly so that your other comments don't
    obscure your
    overall opinion.

    Also, in the documentation you will find questions from the submitter
    to the
    reviewer; whenever you feel you have something to contribute on these
    issues,
    please don't hessitate to include that in your review.


    Thank you,
    Pavol Droba, review manager for the Smart Containers library.

    [ See http://www.gotw.ca/resources/clcm.htm for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]
     
    Pavol Droba, Sep 27, 2004
    #1
    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. Pavel Vozenilek

    ANN: review of Boost.FSM library

    Pavel Vozenilek, Feb 21, 2005, in forum: C++
    Replies:
    0
    Views:
    1,350
    Pavel Vozenilek
    Feb 21, 2005
  2. Pavel Vozenilek

    ANN: Boost review of Singleton library

    Pavel Vozenilek, May 5, 2005, in forum: C++
    Replies:
    1
    Views:
    3,542
    SirMike
    May 5, 2005
  3. =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki

    The boost.variant library and boost::make_recursive_variant

    =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki, Jul 5, 2007, in forum: C++
    Replies:
    1
    Views:
    726
    dasjotre
    Jul 6, 2007
  4. jacob navia
    Replies:
    5
    Views:
    522
    jacob navia
    Sep 28, 2009
  5. Alan Curry

    review of the "container library", part 1/?

    Alan Curry, Mar 1, 2011, in forum: C Programming
    Replies:
    18
    Views:
    670
    jacob navia
    Mar 11, 2011
Loading...

Share This Page