this post was submitted on 13 May 2024
1 points (100.0% liked)
C++
1713 readers
76 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
And even the presented fix hurts my eyes. Should have used a
unique_ptr
oroptional
.Exactly, raw pointers are very rarely the way to go