Archive pour août 2014
Moving an object that wraps a vector and an iterator on that vector
Posté par Olivier dans Trucs & Astuces le 27 août 2014
I recently stumbled upon code that looked very suspicious to me. Basically, it was a class which amongst other things held a vector and some iterators from that vector. Something like this: struct Wrapper { typedef std::vector<int> Data; Data data; Data::iterator active; Wrapper() : data(), active(data.end()) { } […]