[C++-sig] indexing_v2 status update

Raoul Gough RaoulGough at yahoo.co.uk
Mon Nov 24 23:54:00 CET 2003


Here's a status report on the indexing_v2 work I've been doing:

o I've improved the handling for containers of shared_ptr's, so that
  sorting and searching automatically do the right indirection.

o Fixed various layout and naming convention issues

o container_proxy is now strongly exception safe (commit or rollback)

o The container_proxy Generator parameter now works even on MSVC6

o I've added a Flags parameter to allow expensive features (in terms
  of object code size) to be selectively disabled.

o I've added convenience templates for use without partial template
  specialization support (vector_suite, map_suite, etc.)

These last two points bring the interface a little closer to what Joel
de Guzman had originally, although the flags that he used were passed
separately as individual bool parameters instead of as flag bits. He
certainly wasn't kidding about the extra effort in supporting MSVC6.

So as far as I know, there is no outstanding coding work remaining for
the current level of functionality. I'm now updating the documentation
to reflect the recent changes, and then the suite, in my opinion, will
be ready for release.

One possible extension I've been thinking about, as suggested by Ralf
W. Grosse-Kunstleve, is the idea of allowing construction of a
container from a Python iterable object:

e.g. v = Vector ([1,2,3])

The ideal way to do it would be to massage the single input parameter
into two C++ iterators that could be passed to the templated vector
constructor, but I haven't looked far enough into the constructor
dispatching internals to know how to do this, or even if it is
possible. The problem, AFAICS, would be knowing when to select that
overload of the constructor and when not to, and how/where to insert
the necessary code to create the two iterators from the single Python
object. Any advice would be appreciated. This might also be
significant for another of Ralf's suggestions - pickling support.

So I have two loosely related questions - what do people thing about
including the current indexing_v2 suite in release 1.31, and should I
try adding the iterator-based constructor support?

-- 
Raoul Gough.
export LESS='-X'





More information about the Cplusplus-sig mailing list