Opened 8 years ago

Closed 7 years ago

#11061 closed Bugs (fixed)

imposible to traverse the path of the reverse iterator

Reported by: gilles.guerre8chaley@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

This code throws an execption memory "std :: bad_alloc" in visual studio 2013

#include "stdafx.h" #include <iostream> #include <boost/filesystem.hpp> #include <boost/range/adaptor/reversed.hpp>

int _tmain(int argc, _TCHAR* argv[]) {

using boost::filesystem::path; path b = path("user/AppData/Roaming"); for (auto v : b){

std::cout << v << std::endl;

} for (auto v : boost::adaptors::reverse(b)){

std::cout << v << std::endl;

}

return 0;

}

Change History (1)

comment:1 by Beman Dawes, 7 years ago

Resolution: fixed
Status: newclosed

This ticket has been resolved by the addition of the class path reverse_iterator feature and rbegin() and rend() members. The reference documentation has also been updated with a note warning about the limitations of class path iterators.

These changes should show up in the develop branch later today, and in master in a few days.

Thanks for the report,

--Beman

Note: See TracTickets for help on using tickets.