This commit is contained in:
EmsiaetKadosh
2025-02-05 15:13:02 +08:00
parent edcc095979
commit a086558f2d
19 changed files with 388 additions and 56 deletions
-16
View File
@@ -4,21 +4,5 @@
#pragma once
struct B {
int a = 1;
B() { std::wcout << L"common constructor\n"; }
B(B&) { std::wcout << L"copy constructor\n"; }
// B(B&& other) noexcept { std::wcout << L"move constructor\n"; }
};
struct A {
B b;
explicit A(B&& other) : b(other) {}
};
inline void test() {
B b;
A a{ B() };
a = A(std::move(a.b));
}