Opened 13 years ago

Last modified 13 years ago

#3450 assigned Bugs

[fix in git] Bug into boost::python::stl_input_iterator

Reported by: micdestefano@… Owned by: troy d. straszheim
Milestone: Boost 1.41.0 Component: python USE GITHUB
Version: Boost 1.40.0 Severity: Problem
Keywords: multiple traverse Cc:

Description

I noticed that if you try to traverse more than once the range (begin,end) obtained with the stl_input_iterator, you don't get the expected results.

Please, look at the attached code (rangemodule.cpp) and at the usage from the python console (python_console.txt).

The problem is given by the call to the std::distance function.
If you build with -DWORK_AROUND the problem disappears, but I need to call std::distance, because it is the original class that calls it (and I prefer not to modify it simply for building a python extension).

Attachments (2)

rangemodule.cpp (1.4 KB ) - added by anonymous 13 years ago.
python_console.txt (180 bytes ) - added by micdestefano@… 13 years ago.

Download all attachments as: .zip

Change History (5)

by anonymous, 13 years ago

Attachment: rangemodule.cpp added

by micdestefano@…, 13 years ago

Attachment: python_console.txt added

comment:1 by troy d. straszheim, 13 years ago

Owner: changed from Dave Abrahams to troy d. straszheim
Status: newassigned

comment:2 by troy d. straszheim, 13 years ago

Summary: Bug into boost::python::stl_input_iterator[fix in git] Bug into boost::python::stl_input_iterator

comment:3 by micdestefano@…, 13 years ago

Thank you very much. Will this fix be included into Boost 1.41 release ?

Note: See TracTickets for help on using tickets.