id summary reporter owner description type status milestone component version severity resolution keywords cc 3583 iterator in fusion::detail::segmented_range not adjusted after copying Christopher Schmidt Eric Niebler "Consider the following code: {{{ boost::fusion::begin(boost::proto::flatten(a_ >> b_)) }}} with a_ and b_ being two proto terminals. Internally this will yield to a local instantiation of fusion::detail::segmented_range > >. This segmented range view is copied in a fusion::cons, and this cons is returned to the caller [https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/view/ext_/segmented_iterator.hpp#L272 segmented_iterator.hpp#L272] The iterator (segmented_range::where_) on the single view (segmented_range::sequence) is not adjusted when being copyed. Therefore the where_ attribute of the segmented_range in the cons points to an already destructed single view after the cons is returned to the caller. At the moment this is not much of a problem as single view iterators store a copy of the value of the actual single_view they point to ([https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/view/single_view/single_view_iterator.hpp single_view_iterator.hpp]). With the upcoming c++0x port of fusion this behaviour will change though. Single view iterators will store a pointer to the actual single view instead." Bugs closed Boost 1.42.0 proto Boost Development Trunk Problem fixed Christopher Schmidt