diff options
Diffstat (limited to 'test.cpp')
| -rw-r--r-- | test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -8,7 +8,7 @@ class C1 { -public: +public: C1() : name{"default"} { std::cout << "C1 default cons: " << name << std::endl; @@ -31,11 +31,11 @@ public: std::cout << "C1 move constructor: " << name << std::endl; other.name+=" (moved away)"; } - + C1& operator=(C1&& other) { std::cout << "C1 move called: " << other.name << " -> " << name << std::endl; name = other.name; - other.name+=" (moved away)"; + other.name+=" (moved away)"; return *this; } @@ -51,7 +51,7 @@ public: std::cout << "C1 says: " << name << std::endl; } -private: +private: std::string name; @@ -77,5 +77,5 @@ int main() { c.say(); return EXIT_SUCCESS; - + } |
