Thanks to visit codestin.com
Credit goes to github.com

Skip to content

clarify C++ copy constructor vs assignment operator #37

@chmullig

Description

@chmullig

Clarify what happens in each of the situations below.

MyString s1("hello");
MyString s2(s1);
MyString s3 = s1;
MyString s4;
s4 = s1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions