Files
spectrumAnalyzer/TestCode.h
T
EmsiaetKadosh edcc095979 Changes
2025-01-21 15:41:32 +08:00

25 lines
376 B
C++

//
// Created by EmsiaetKadosh on 25-1-20.
//
#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));
}