Hard
One const Widget, two constructors
What does this program print?
main.cpp
#include <iostream>
#include <utility>
struct Widget {
Widget() = default;
Widget(const Widget&) { std::cout << "copy ctor\n"; }
Widget(Widget&&) noexcept { std::cout << "move ctor\n"; }
};
int main() {
const Widget a;
Widget b(std::move(a));
}82 of 117 in C++