Are there any standard/de facto standard (boost) wrappers around standard algorithms which work with containers defining begin and end. Let me show you what I mean with the code:
// instead of specifying begin and end
std::copy(vector.begin(), vector.end(), output);
// write as
xxx::copy(vector, output);
I know it can be written easily, but I am looking specifically for something ubiquitous.
Thanks.
There is an extension to the Boost Range library called RangeEx which contains range wrappers for all stl algorithms, plus some new ones.
It has recently been accepted into Boost and so it’s not yet in the current “official” release (1.41). Until this changes, you can download the latest version from the Boost Vault.
Don’t know if this will ever become part of the C++ standard, but the fact that it’s in Boost means that it will be the de facto standard.