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

Why can forwarding an argument fail to be "perfect" with braced initializer lists, as in the marked call?

template <class... Args> auto build(Args&&... args) { return std::vector<int>(std::forward<Args>(args)...); } auto v = build({1, 2, 3}); // marked call