id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2478,Invalid assert in boost::filesystem::path::iterator,Raffi Enficiaud ,Beman Dawes,"The following code asserts (fs = boost::filesystem) //**** Code begin fs::path p1(""/tmp/unit/repertoire""), p2(""/tmp/unit/repertoire/.""); fs::path::iterator it1 = p1.begin(), it1e = p1.end(), it2 = p2.begin(), it2e = p2.end(); for(; (*it1 == *it2) && (it2 != it2e) && (it1 != it1e); ++it1, ++it2) {} p2 = """"; while(it2 != it2e) { p2 /= *it2; ++it2; // <- asserts on this line (first pass) } //**** Code end The assertion (DEBUG defined) is thrown on line 1342 inside file ""boost/filesystem/path.hpp"". Basically, the assert checks if the increment it outside of the range of iteration. However, after checking it2 != it2e, I should be able to increment it (but not the dereference it). Moreover, if it2 != it2e, I should be able to call ++it2. The environnement is the following : - Windows XP (on virtual box) - Visual C++ express 2008 (version 9.0.21022.8 RTM) - Boost 1.37 (I think it is the same with 1.36)",Bugs,closed,Boost 1.38.0,filesystem,Boost 1.36.0,Problem,invalid,,