Easy
Constructor calls when returning a temporary by value
Compiled as C++17 or later, what does this program print?
main.cpp
#include <iostream>
struct Noisy {
Noisy() { std::cout << "construct\n"; }
Noisy(const Noisy&) { std::cout << "copy\n"; }
Noisy(Noisy&&) { std::cout << "move\n"; }
};
Noisy make() {
return Noisy();
}
int main() {
Noisy n = make();
}10 of 117 in C++