Consider the following code: ``` #include <string> auto f1(auto&& v) { return v; } auto f2(auto&& v) { return std::forward<decltype(v)>(v); } int main() { return f1(std::string("hello")).size() + f2(std::string("hello")).size(); } ``` clang will generate the [same assembly code](https://godbolt.org/z/WrzaqePW8) for `f1` and `f2`. However, - As per [the C++ core guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-forward), `f2` is recommended; - As per [p0527r1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0527r1.html), `f1` is enough since C++23. - It's possible that `f2` has an extra function call than `f1`. We should not depend on the compiler to optimize that out; even if it almost always does. Should we still always `std::forward` a universal reference argument? or the C++ core guidelines should be updated? Cited from [https://stackoverflow.com/questions/79657383/should-we-still-always-stdforward-a-universal-reference-argument-even-if-unnec](https://stackoverflow.com/questions/79657383/should-we-still-always-stdforward-a-universal-reference-argument-even-if-unnec)