What's the go with the GC these days?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Jan 8 11:11:59 UTC 2019
On Sunday, 6 January 2019 at 07:48:03 UTC, Manu wrote:
> Ref counting in C++ is a sloppy hack. I really just want the
> compiler
> to emit opInc and opDec appropriately on either sides of a
> reference
> assignment, and let me take it from there.
I believe C++ compilers are allowed to do this for shared_ptr,
but you would need global optimization for it to make much sense.
But shared_ptr is not frequently used in performance sensitive
loops, because it is slow, so it doesn't make a lot of sense for
compiler implementors to spend that much time on it...
More information about the Digitalmars-d
mailing list