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

C++

1763 readers
1 users here now

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

Rules

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

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

[โ€“] rasensprenger@feddit.de 3 points 6 months ago

Exactly, raw pointers are very rarely the way to go

load more comments (3 replies)