3 ms·
Then, instantiate the smart pointer with a custom no-op deleter and if you use the nt typedef I mentioned above, you'll get a similar compiler output to Rust's.
by deadcanard 4y ago
Then, instantiate the smart pointer with a custom no-op deleter and if you use the nt typedef I mentioned above, you'll get a similar compiler output to Rust's.
e.g nt_shared_ptr<Data> x(&d, [](Data*) -> void{});
https://godbolt.org/z/d3qv4cE1v https://godbolt.org/z/d3qv4cE1v