summaryrefslogtreecommitdiff
path: root/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test.cpp')
-rw-r--r--test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.cpp b/test.cpp
index b987af9..cf2830c 100644
--- a/test.cpp
+++ b/test.cpp
@@ -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;
-
+
}