Cpp/RuntimePolymorphism/RuntimePolymorphism1.cpp
Object(const Object& x)
        // virtualized copy. Equivalent to :
        // m_self(std::make_unique<Model<T>>(*x.m_self))
        : m_self(x.m_self->copy())
    {
        std::cout << "Object copy" << std::endl;
    }
// Guidelines:
// - The semantics of copy are to create a new object which is equal to and
//   logically disjoint from the original.
// - Copy constructor must copy the object. The compiler is free to elide
//   copies so if the copy constructor does something else the code is
//   incorrect.
// - When a type manages 'remote parts' it is necessary to supply a copy
//   constructor. If you can, use an existing class (such as vector) to -
//   manage remote parts.
The semantics of copy are to create a new object which is equal to and
logically disjoint from the original.
Copy constructor must copy the object. The compiler is free to elide
copies so if the copy constructor does something else the code is
incorrect.
When a type manages 'remote parts' it is necessary to supply a copy
constructor. If you can, use an existing class (such as vector) to
manage remote parts.
The semantics of copy are to create a new object which is equal to and logically disjoint from the original . Copy constructor must copy the object . The compiler is free to elide copies so if the copy constructor does something else the code is incorrect . When a type manages ' remote parts ' it is necessary to supply a copy constructor . If you can use an existing class ( such as vector ) to manage remote parts .
Object(const Object& x)
        : m_self(x.m_self->copy())
    {
        std::cout << "Object copy" << std::endl;
    }
Object ( const Object & x ) : m_self ( x . m_self -> copy ( ) ) { std :: cout << " " << std :: endl ; }
Guidelines:
 The semantics of copy are to create a new object which is equal to and
logically disjoint from the original.
Guidelines : The semantics of copy are to create a new object which is equal to and logically disjoint from the original .
// virtualized copy. Equivalent to : // m_self(std::make_unique<Model<T>>(*x.m_self))