Wrapping STL algorithms for use with STL containers
Saturday, December 6th, 2008In the algorithm header, most algorithms work on iterator ranges. Most of the time, I just want the algorithm to work on the whole container. So, for example, with std::find I’ll often find myself typing this: location = std::find(mycontainer.begin(), mycontainer.end(), somevalue); I’d much rather write this: location = std::find(mycontainer, somevalue); So I started wrapping the […]