If you got to remove one feature from #cplusplus, what would it be?
For me, comma operator.
Except destructors would still exist. So now copies and move ctors are gone and dtors are even more dangerous as a result.
-
-
Why would that make destructors more dangerous? It seems to work okay in e.g. Rust.
-
Suppose I have a class that contains a handle to a ref-counted object. When the class gets destructed I want to call releaseRef(handle). Without a copy or move ctor, I could easily call releaseRef() more times than addRef().
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.