
20 Mar
2009
20 Mar
'09
4:55 a.m.
I'm trying to do something like this: boost::shared_ptr<const Foo> fooPtr( boost::static_pointer_cast<const Foo>(typeErasedFoo), CustomDeleter<const Foo>() ); where typeErasedFoo is of type: boost::shared_ptr<const void> The first statement compiles if I remove the custom deleter, but if I leave it in, I get errors saying: cannot convert parameter 2 from 'CustomDeleter<T>' to 'boost::detail::sp_enable_if_convertible_impl<true>::type' Is there any way to do what I'm trying to do? I no longer need typeErasedFoo after the cast if that helps.