this post was submitted on 13 May 2024
4 points (61.1% liked)

C++

2006 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] cmeerw@programming.dev 9 points 1 year ago (4 children)

And even the presented fix hurts my eyes. Should have used a unique_ptr or optional.

[โ€“] rasensprenger@feddit.de 3 points 1 year ago

Exactly, raw pointers are very rarely the way to go

load more comments (3 replies)