79594109

Date: 2025-04-26 15:48:40
Score: 2
Natty:
Report link

In C++23 there is std::out_ptr that does exactly this and works with both unique_ptr and shared_ptr. The documentation has some great examples.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Johan Buratti