id summary reporter owner description type status milestone component version severity resolution keywords cc 11303 boost::next(i,n) compilation error with -D_GLIBCXX_DEBUG pawels@… No-Maintainer "std::map provides bidirectional iterator while boost::next(i,n) tries to use the plus-assign which is random iterator specific. {{{ % g++ -Wall gcc-bug.cpp -c -Og -isystem ~/dvm/sandbox/buildenv/boost-1.58.0/include -D_GLIBCXX_DEBUG In file included from /usr/include/c++/4.9.2/debug/map.h:33:0, from /usr/include/c++/4.9.2/debug/map:33, from /usr/include/c++/4.9.2/map:66, from gcc-bug.cpp:2: /usr/include/c++/4.9.2/debug/safe_iterator.h: In instantiation of ‘__gnu_debug::_Safe_iterator<_Iterator, _Sequence>& __gnu_debug::_Safe_iterator<_Iterator, _Sequence>::operator+=(const difference_type&) [with _Iterator = std::_Rb_tree_iterator >; _Sequence = std::__debug::map; __gnu_debug::_Safe_iterator<_Iterator, _Sequence>::difference_type = long int]’: /home/pawels/dvm/sandbox/buildenv/boost-1.58.0/include/boost/next_prior.hpp:73:11: required from ‘static T boost::next_prior_detail::next_impl1::call(T, Distance) [with T = __gnu_debug::_Safe_iterator >, std::__debug::map >; Distance = int]’ /home/pawels/dvm/sandbox/buildenv/boost-1.58.0/include/boost/next_prior.hpp:151:67: required from ‘T boost::next(T, Distance) [with T = __gnu_debug::_Safe_iterator >, std::__debug::map >; Distance = int]’ gcc-bug.cpp:8:66: required from here /usr/include/c++/4.9.2/debug/safe_iterator.h:357:13: error: no match for ‘operator+=’ (operand types are ‘std::_Rb_tree_iterator >’ and ‘const difference_type {aka const long int}’) _M_current += __n; ^ }}} " Bugs closed To Be Determined utility Boost 1.58.0 Regression duplicate raad@…