#include <vector>
#include <utility>

template <typename T>
class r_value_ref
{
public:
    explicit r_value_ref(const T& t) : t(t) {}

    T& get() const
    {
        return const_cast<T&>(t);
    }
    
    operator T&() const
    {
        return const_cast<T&>(t);
    }

private:    
    const T& t;
};

template <typename T>
r_value_ref<T> my_move(const T& t)
{
    return r_value_ref<T>(t);
}

class Foo
{
public:
    Foo(r_value_ref<std::vector<int> > vec)
    {
        m_vec.swap(vec); // no .get() required !
        // or std::swap(vec.get(), m_vec);
    }

private:
    std::vector<int> m_vec;
};

int main()
{
    Foo foo_from_r_value(my_move(std::vector<int>(100, 1337)));

    std::vector<int> v2(100, 1337);
    Foo foo_from_l_value(my_move(v2));
}
