|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-30 23:16:54
Ullrich,
the cursor stuff looks good, but it leaves me wondering why your interface
provides:
y = l.cursor()[3]
for x in l.cursor():
but not:
y = l[3]
for x in l:
which would seem more natural.
----- Original Message -----
From: "Ullrich Koethe" <koethe_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, November 30, 2000 11:49 AM
Subject: Re: [boost] py_cpp and vector<..>::const_iterator
OK, I put the cursor into branch "cursor", and the build system into
branch "build_system". Both include updated documentation. Please test
these extensions and, if OK, integrate them into the main branch.
Regards
Ulli
David Abrahams wrote:
>
> Ullrich,
>
> Compilers w/o partial specialization have trouble with iterator_traits,
but
> I think the iterator_category() function always works, except for
> user-defined iterators. In STLport, iterator_category() also works for
> user-defined iterators if they are derived from std::iterator<>.
>
> Please feel free to integrate this (on a branch).
> Also, if you want to check in your build/configure system, that would be
> lovely. I think it requires an update to building.html, though.
>
> -Dave
>
> ----- Original Message -----
> From: "Ullrich Koethe" <koethe_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Thursday, November 30, 2000 8:42 AM
> Subject: Re: [boost] py_cpp and vector<..>::const_iterator
>
> David,
>
> good idea, no problem. Do you want me to integrate this into BPL (as a
> branch at first)? If yes, I need to know how to find out the
> iterator_category in a non-conforming compiler such as MSVC.
>
> Regards
> Ulli
>
> David Abrahams wrote:
> >
> > Ullrich,
> >
> > it would be great if you could find a way to keep a reference to the
> > container alive as long as the cursor was in existence. Otherwise, the
> user
> > risks crashing from Python because of a dangling reference.
> >
> > -Dave
-- ________________________________________________________________ | | | Ullrich Koethe Universität Hamburg / University of Hamburg | | FB Informatik / Dept. of Computer Science | | AB Kognitive Systeme / Cognitive Systems Group | | | | Phone: +49 (0)40 42883-2573 Vogt-Koelln-Str. 30 | | Fax: +49 (0)40 42883-2572 D - 22527 Hamburg | | Email: u.koethe_at_[hidden] Germany | | koethe_at_[hidden] | | WWW: http://kogs-www.informatik.uni-hamburg.de/~koethe/ | |________________________________________________________________|
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk