1

I want to konw what happened in this code? And, what diffrent to invoke A a(other).

#include <iostream>
#include <string>
#define LOG() (cout << __PRETTY_FUNCTION__ << endl)

using namespace std;

struct A
{
    A() { LOG(); }
    A(const A&) { LOG(); }
    const A& operator=(const A&) { LOG(); }
};

int main(void)
{
    A a(A());
    return 0;
}

output nothing.

0 Answers0