|
Boost : |
From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-04-23 16:44:24
On Wed, 2008-04-23 at 15:18 -0400, Frank Mori Hess wrote:
> If you initialize in the constructor, you have to always create a
> deleter_wrapper. Currently, one is only created if you need it. I'd guess
> you would find the current behavior preferrable.
OK, thanks for clarifying.
> It's fine.
OK, committed.
> > For the vtable, we could remove it by switching shared_from_this from a
> > member function to a free function that takes T* as a parameter, but
> > that's of course a breaking change...
>
> Didn't you propose something before like implementing the current esft
> interface as a derived class from a vtable-free base class that uses the free
> function approach? The last thing I saw from Peter about that was it needed
> to maintain compatibility.
Peter raised a valid concern about compatibility with TR1 and C++0x. I
pointed out that C++0x is not yet standardized, so this is our chance to
improve the interface. std::tr1::esft<T> could be derived from std::esft
(note, no template). Likewise for boost::tr1::esft<T> and boost::esft.
Of course the TR1 implementation needs an additional T* (in my optimized
1.35.0 esft version) or a vtable (in your trunk version), so only the
non-TR1-version would benefit.
As it has already been pointed out that the implementation should not
drive the interface, I'd like to point out that the interface should not
*force* some overhead without a good reason (IMHO).
I attached an (untested) wrapper for tr1, just in case someone is
interested in seeing some code...
Regards, Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk