Re:C++ Headers are Expensive
by blt on Tuesday January 08, 2019 @02:32AM
(#18853945)
Totally agree. Recently used unique_ptr with a custom deleter is to consume a C library that requires heap allocation with its own alloc/free functions. No destructor!
[ Parent
| on HN ]
Re:C++ Headers are Expensive
by beached_whale on Tuesday January 08, 2019 @07:56AM
(#18855188)
I have a class, boringly called value_ptr, that is like unique ptr but if the underlying value supports copy will do a copy constructor and assignment too. Then I don’t have to make one is the classes like this too where I am using a ptr for other reasons. It also has const correctness