Boost logo

Boost Users :

Subject: Re: [Boost-users] [mem_fn] Ambiguous call to mem_fn with stdcallfunction
From: Conrad Scott (conrad.scott_at_[hidden])
Date: 2009-03-08 07:30:54


Peter Dimov wrote:
> There's also the option of using
>
> struct com_deleter
> {
> template<class T> void operator()(T* p) const
> {
> p->Release();
> }
> };
>
> void test(IDirect3DDevice9 * const device)
> {
> boost::shared_ptr<IDirect3DDevice9> ptr(
> device,
> com_deleter() );
> }
Many thanks for this suggestion Peter. I've moved to using this sort of
mechanism for now (and thus also dropped the #define
BOOST_MEM_FN_ENABLE_STDCALL).

All the best,
Conrad


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