[GiNaC-list] Use of STL iterators in GiNaC
Pierangelo Masarati
masarati at aero.polimi.it
Thu Apr 16 14:34:18 CEST 2009
Jens Vollinga wrote:
> Hi,
>
> Michael Goffioul schrieb:
>> I'm currently tracking down these issues by running the test
>> suite in the source package, but this might not catch all of them.
>> If you are interested, I can send a patch once I succeed to run
>> the test suite completely.
>
> yes, that would be interesting! I'd like to see where this happens. I
> don't have access to a VC compiler to try it myself, though.
>
> I see no problem with dereferencing end(), and doing operations like
> end()+<integer>. In that case, end() should return a proper iterator as
> a temporary and on these the operations +,- are defined (somewhere
> 24.1.5 in the standard, I believe). But maybe there is a ++ or -- involved?
As far as I recall, end() cannot be dereferenced, but only used to test
for out-of-range. In any case, to track problems run-time with
libstdc++, you can enable specific debug mode (see
<http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html>, thanks
to Marco Morandini for pointing it out). I do not recall any
compile-time tests available with g++.
Cheers, p.
More information about the GiNaC-list
mailing list