template <class In, class X> void remove_copies(In begin, In end, In bk(In), const X& x)
{
In cont;
if (*begin != x)
bk(cont);
++begin;
};
template <class In, class X, class Out> Out remove_copys(In begin, In end, Out iterator, const X& x)
{
while (begin != end) {
if (*begin != x) {
*iterator = *begin;
++iterator;
}
++begin;
}
return iterator;
};