http://coliru.stacked-crooked.com/a/8356f09dff0c9308
#include
struct A
{
A(int& var) : r(var) {}
int &r;
};
int main(int argc,
Copy assignment operator and Copy constructor are TWO different things. It does NOT guarantee that when copy assignment operator exist, copy constructor also exist, but they follow their own rules.
From copy assignment operator, it mentions :
If T has a non-static data member of a reference type, then the defaulted copy assignment operator for class T is defined as 'Deleted'. That;s the case :D
For the Copy constructor, it has its own rule to decide whether deleted or not, for example, if Non static rvalue reference data member exist in a class, then the default copy constructor will be defined as 'Deleted'. You can see more by visit docs.