#include <iostream>
#include <iomanip>

using namespace std;

class Test {
public:
    Test()             { cout << "Test()" << endl; }
    Test(int x):val_(x){ cout << "Test(" << x << ")" << endl; }
    Test(const Test& t):val_(t.val_) { cout << "Test(const Test& " << t.val_ << ")" << endl; }
    Test& operator = (const Test& t)  {
        cout << "Test& operator = (const Test& " << t.val_ <<")" << endl;
        val_ = t.val_;
        return *this;}
    ~Test()           { cout << "~Test()" << endl; }
    int val() const { return val_; }
private:
    int val_ = 0;
};

int main(int argc, const char * argv[])
{
    Test t = t;
    cout << t.val() << endl;
}
