#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>

struct X
{
    X(int n) : n_(n) { }
    X(const X& rhs) : n_(rhs.n_) { }
	X& operator=(X&& rhs) { n_ = rhs.n_; std::cout << "=(X&&) "; }
    int n_;
};

int main()
{
    std::vector<X> v{2, 1, 8, 3, 4, 5, 6};
    v.erase(std::remove_if(std::make_move_iterator(std::begin(v)),
                           std::make_move_iterator(std::end(v)),
                           [] (const X& x) { return x.n_ & 1; }).base(),
            std::end(v));
    for (auto& x : v)
        std::cout << x.n_ << ' ';
    std::cout << '\n';
}