Boost logo

Boost Users :

Subject: Re: [Boost-users] Avoiding reinventing the wheel for a public api with binary compatibility in mind
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2009-11-05 01:10:45


On Wed, Nov 4, 2009 at 8:16 PM, Geoff Hilton
<geoff.hilton_at_[hidden]> wrote:
> I'm writing a public api for a product which will be bundled as a
> precompiled dll or binary and one of my goals is binary compatibility

> eg.
> template<typename T>
> class MyClass {
> public:
> T foo();
> private:
> boost::shared_ptr<MyClassImpl<T> > impl;
> };
>

Use boost::intrusive_ptr<> and make sure the intrusive_ptr_add_ref(T)
and intrusive_ptr_release(T) are implemented _inside_ your DLL.

Tony


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net