Gavin Doughtie on 19 Aug 2003 02:54:43 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] picky compiler or bad code?


takemgr::PathVector is just a std::vector<boost::filesystem::path>

mFiles is an instance of same.

is there a preferred syntax for getting an iterator into a vector at an arbitrary offset besides "&someVector[index]" ?

Gavin

Jon Stewart wrote:
The following code:

   mFiles.resize(FRAME_COUNT*2);
std::generate(static_cast<takemgr::PathVector::iterator>(&mFiles[FRAME_COUNT] ), mFiles.end(), TestFileGenerator(mDir));

did not require the "static_cast" in gcc 2.96, but did in gcc 3.22. Is my code evil on its face or is gcc just pickier nowadays?



It depends. Is takemgr::PathVector::iterator a pointer?



Jon

_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp