#include <iostream> 
#include <utility> //für std::move 
#include <vector> 
#include <cstdlib> 
struct A 
{ 
    std::vector<int> n; 
  
    A(A&& a)  {  n.swap(a.n); std::cout<<"swaped"<<std::endl; } 
    A(const A&  a) : n(a.n) { std::cout<<"kopiert"<<std::endl; } 
    A() {} 
}; 
  
A f() //erstellt irgendein Objekt vom Typ A 
{ 
    A a, b; 
    a.n.push_back(rand()); 
    b.n.push_back(rand());
    if (a.n.back() > 77)
        return a;
    return b;
} 
  
int main() 
{ 
    A b,c; 
  
    A a1(b); //Erwartet: normaler Konstruktor. Passt. 
    A a2(std::move(c)); //Erwartet: Rvalue Construktor: Passt 
    A a3(f()); //Erwartet: Rvalue Konstruktor. Passt nicht. 
}