id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13002,boost::prior does not compile when used with std::set reverse_iterator,Cory Omand ,No-Maintainer,"Given the following code snippet: {{{ #include #include int main(int argc, char *argv[]) { std::set myints { 1, 2, 3, 4, 5 }; boost::prior(myints.rbegin(), 1); return 0; } }}} This fails to compile against boost 1.61.0. {{{ $ g++ -std=c++11 boost-test.cpp In file included from /usr/lib/gcc/x86_64-redhat-linux-gnu/4.8.3/include/c++/iterator:63:0, from /usr/include/boost/next_prior.hpp:15, from boost-test.cpp:1: /usr/lib/gcc/x86_64-redhat-linux-gnu/4.8.3/include/c++/bits/stl_iterator.h: In instantiation of ‘std::reverse_iterator<_Iterator>& std::reverse_iterator<_Iterator>::operator-=(std::reverse_iterator<_Iterator>::difference_type) [with _Iterator = std::_Rb_tree_const_iterator; std::reverse_iterator<_Iterator>::difference_type = long int]’: /usr/include/boost/next_prior.hpp:138:11: required from ‘static T boost::next_prior_detail::prior_impl1::call(T, Distance) [with T = std::reverse_iterator >; Distance = int]’ /usr/include/boost/next_prior.hpp:160:68: required from ‘T boost::prior(T, Distance) [with T = std::reverse_iterator >; Distance = int]’ boost-test.cpp:7:36: required from here /usr/lib/gcc/x86_64-redhat-linux-gnu/4.8.3/include/c++/bits/stl_iterator.h:265:10: error: no match for ‘operator+=’ (operand types are ‘std::_Rb_tree_const_iterator’ and ‘std::reverse_iterator >::difference_type {aka long int}’) current += __n; ^ }}} There do not appear to be any further changes to boost/next_prior.hpp since the current state of that file in 1.61 after commit 651a869, so it is identical to the header shipped in 1.64.",Bugs,closed,To Be Determined,utility,Boost 1.61.0,Regression,duplicate,,