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

Why is using `std::move` instead of `std::forward` inside a forwarding function template a bug?

template <typename T> void relay(T&& arg) { consume(std::move(arg)); // instead of std::forward<T>(arg) }