#include <vector>
#include <iostream>
using namespace std;

struct X {
   int i;
   X(int i_): i(i_) { cout << "X():       " << i << endl; }
   X(const X&x): i(x.i) { cout << "X(const X&): " << x.i << endl; }
   X(X&&x): i(x.i) { cout << "X(X&&x):   " << x.i << endl; }
};
X ternary(bool cond) {
    X a(1);
    X b(2);

    return cond ? a : b;
}
X ifelse(bool cond) {
    X a(1);
    X b(2);

    if(cond) return a; else return b; // uses
}
int main() {
    X v = ternary(true);
    X w = ifelse(true);
    return 0;
}
