Opened 13 years ago
Last modified 13 years ago
#3450 assigned Bugs
[fix in git] Bug into boost::python::stl_input_iterator
| Reported by: | 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)
Change History (5)
by , 13 years ago
| Attachment: | rangemodule.cpp added |
|---|
by , 13 years ago
| Attachment: | python_console.txt added |
|---|
comment:1 by , 13 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 13 years ago
| Summary: | Bug into boost::python::stl_input_iterator → [fix in git] Bug into boost::python::stl_input_iterator |
|---|
comment:3 by , 13 years ago
Thank you very much. Will this fix be included into Boost 1.41 release ?

Fix on my python branch:
http://gitorious.org/~straszheim/boost/straszheim/commit/a8979df969fd44bfaa649599293ccb173f6c29c7