Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-01-30 19:53:19


"David B. Held" <dheld_at_[hidden]> wrote in message
news:b1c5tk$pbf$1_at_main.gmane.org...
> > > [...]
> > > ~ref_counted()
> > > {
> > > delete pCount_;
> > > }
> > > [...]

Unfortunately, my latest solution brings up a nice little gem from VC++:
sizeof(smart_ptr) == 12, not 8. No amount of rearranging of the bases
seems to restore that magical state when even VC++ gave me
sizeof == 8. I suspect it all has to do with the non-trivial d'tors somehow
interfering with EBO. It's especially problematic that you can't turn on
EBO explicitly for VC++. I tried setting it to Favor Small Code, to no
effect. Setting alignment to 1 just gives sizeof == 9 instead of 12. Any
VC++ geniuses with suggestions? I'm pretty near the end of my rope
(ok, there were about 4 permutations I didn't try, but I would be extremely
surprised if one of them were "magical").

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk