c++-sig@python.org
[Top] [All Lists]

Re: [C++-sig] [ vector | list ] indexing suite

Subject: Re: [C++-sig] [ vector | list ] indexing suite
From: Joel de Guzman
Date: Wed, 21 Jun 2006 08:28:07 +0800
Niall Douglas wrote:
> On 20 Jun 2006 at 14:56, Roman Yakovenko wrote:
> 
>> Hi. While working on adding support to pyplusplus for indexing suite,
>> I took a look on
>> vector_indexing_suite.
>>
>> I think that with a small change of code it is possible to make
>> "vector_indexing_suite" class
>> to work with std::list. The change is simple: to replace operator[]
>> and iterator += ( Distance )
>> with std::advance( iterator, Distance ). I am almost sure that there
>> is no performance
>> penalties for this change.
>>
>> What do you think? Am I missing some trivial reason why this change
>> could not be done?
> 
> You would be far better off using the new and improved indexing 
> suite. It's still sitting in CVS on some experimental branch. It is a 
> lot more efficient, already automatically interfaces with std::list 
> and std::vector and also can be easily extended to handle any 
> arbitrary kind of container.
> 
> TnFOX uses the new indexing suite. Saved me hours of extra work. 
> Search the mailing list archives for Raoul Gough.

I think this is definitely the way to go. It makes perfect sense
for Raoul's work to replace the current indexing suite. Last
time I heard from Raoul, he was having some problems with VC6
porting. I wonder if VC6 is still relevant for Boost.Python
now, Dave?

Regards,
-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net
_______________________________________________
C++-sig mailing list
C++-sig@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/c++-sig

<Prev in Thread] Current Thread [Next in Thread>