#include <iostream>

struct Foo
{
    explicit Foo(int i) : i_(i) {std::cout << "Foo constructor " << i_ << std::endl;}
    Foo(const Foo& rhs) : i_(rhs.i_)
    {
        std::cout << "Foo copy constructor" << i_ << std::endl;
    }
    Foo& operator=(const Foo& rhs)
    {
        i_ = rhs.i_;
        std::cout << "Foo copy assignment" << i_ << std::endl;
    }
    ~Foo() { std::cout << "Foo destructor " << i_ << std::endl;}
    int i_;
};

int main()
{

    {
        Foo f1 = *new Foo(1);
        Foo f2(2);
    }
    std::cout << "Bye" << std::endl;
}