
12 Nov
2009
12 Nov
'09
1:48 a.m.
For this particular case, the usual answer is that you should be using a sentinel-terminated range instead of the find, something like this:
auto before_part = before(v.all(), X);
Is vector<T>::erase polymorphic? I assume the following is a valid way to clear a vector v.clear(v.all()); So, what exactly does v.all() return? RandomAccessRange<???>? If so, would the following compile? deque<int> d; vector<int> v; v.clear(d.all()); Here we'd lose some static checks compared to current stl, the above is obviously illegal. Utterly confused, Christian