[C++-sig] Re: Example of use of indexing_suite NOT using the STL
RaoulGough at yahoo.co.uk
Fri Oct 10 21:10:58 CEST 2003
"Niall Douglas" <s_sourceforge at nedprod.com> writes:
> I read your docs but like most of the boost.python stuff I don't get
> most of it. This is probably mostly my fault, however I understand
> loki's documentation fine so I think it's a strong case of writing
> style ie; yours is not how I think or how I write my documentation.
I haven't seen the loki documentation, but maybe I should have a look
at it. I have to agree with you about the documentation being hard to
follow - mostly, it makes sense only once you've already figured it
out some other way. The trouble is probably that it is written mostly
as a reference instead of being a tutorial or user guide. Both types
are important to have, IMHO.
> As with Boost.Python, it's likely I'll just have to plough through
> the source code which TBH I find about as easy as the docs :( At
> least I suppose both together must make for something better than
> either alone.
>> Details of getting the new suite from CVS are in my message "New
>> indexing suite available on indexing_v2 branch" from 2003/10/07.
>> BTW, I plan to add support for overriding parts of the existing
>> algorithms with an extra template parameter - for instance, if your
>> container uses different names for "begin" and "end", it would be
>> possible to override the two relevant static functions in an existing
>> algorithms class via the curiously recurring template pattern.
> Can I use your suite and not have begin() or end() methods? Indeed, a
> C array doesn't even have length!
Well, that's actually not too hard. I haven't yet documented the
iterator_pair template, but you can probably figure it out from the
the getArray function in libs/python/test/testlinear.cpp
BTW, the suite definitely wants to know how long the array is. If you
really want to disable the bounds checking, you could probably just
pretend that the array is "really long" by adding a big number to the
(setq dabbrev-case-fold-search nil)
More information about the Cplusplus-sig