Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++move-capture lambdasSingle-choice MCQ

What is the problem with this move-capture lambda?

auto p = std::make_unique<int>(42); auto f = [q = std::move(p)]() { return *q; }; std::function<int()> g = f;