79386448

Date: 2025-01-25 09:16:07
Score: 1.5
Natty:
Report link

Using Type& as the parameter type will not allow perfect forwarding. The purpose of std::forward is to preserve the value category (lvalue or rvalue) of the argument passed to the constructor, but since you are using Type&, it will only forward as an lvalue reference. To fix this, you need to change the parameter type to Type&&, which will allow both lvalues and rvalues to be forwarded correctly

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: VATSAL DANI