Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++perfect forwarding std::forwardSingle-choice MCQ

Given this forwarding wrapper, what is wrong with the call to `std::forward` inside the loop body?

template <typename... Args> void emplace_all(std::vector<Widget>& v, Args&&... args) { for (int i = 0; i < 2; ++i) { v.emplace_back(std::forward<Args>(args)...); } }