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
- 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