Boost logo

Boost :

From: Ross Boylan (ross_at_[hidden])
Date: 2005-07-13 16:34:26


I'm using the cvs version (as of a couple of days ago) of the
ptr_container library with a regular 1.32 boost.

Should transfer operations between dissimilar containers (e.g.,
ptr_vector and ptr_list, assuming both have the same underlying type)
work? They don't seem to. I can't quite tell from the docs (which
define these abstractly, e.g., for ptr_sequence) whether this should
work or not. Previous versions of the docs made it explicit that the
operations were templated on the type of the second container.

Second, the definition of transfer does not say where the elements are
to be inserted (i.e., whether they go before the "before" iterator, or
whether the "before" iterator will end up before the inserted elements).
While it's not hard to guess right with some knowledge of how the
standard works (and even how other ptr_container functions work), it
would be nice to be explicit.

Third, I didn't see any explicit discussion of circumstances that
invalidate iterators. Again, it's pretty easy to guess this is the same
as the corresponding standard classes, but it's probably worth saying
so.

Finally, the discussion of exception classes does not describe the
circumstances under which the exceptions are thrown. Some functions do
discuss their exceptions, but I'm not sure if they all do. I was
surprised that at throws bad_ptr_container_operation; I would have
expected bad_index (this behavior *is* documented--I'm just saying it
seems odd).

Thanks for your work on these utilities.

-- 
Ross Boylan                                      wk:  (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4          ross_at_[hidden]
Dept of Epidemiology and Biostatistics           fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840                     hm:  (415) 550-1062

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk