lysdexic@programming.devM to C++@programming.devEnglish · 6 months agoHow to avoid one C++ foot gunpboyd.ioexternal-linkmessage-square5fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkHow to avoid one C++ foot gunpboyd.iolysdexic@programming.devM to C++@programming.devEnglish · 6 months agomessage-square5fedilink
minus-squarecmeerw@programming.devlinkfedilinkarrow-up0·6 months agoAnd even the presented fix hurts my eyes. Should have used a unique_ptr or optional.
minus-squarerasensprenger@feddit.delinkfedilinkarrow-up0·6 months agoExactly, raw pointers are very rarely the way to go
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