I can't understand how the copy constructor was called without previous declaration of a.
I understood that the copy constructor takes a reference of A but I did not understand how this reference is initialized.
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <string>
class A {
public:
A() = delete;
A(A&) = default;
void operator = (A&) {}
private:
int x;
};
int main()
{
A a(a);
}