Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-05-23 11:23:48


David Abrahams wrote:
> Rene Rivera <grafik.list_at_[hidden]> writes:
>>David Abrahams wrote:
>>>I think it's a bug and should be reported to MW, but that said,
>>>check
>>>out boost/python/detail/force_instantiate.hpp, which I use for this
>>>exact purpose.
>>
>>I just did, doesn't help :-(
>
> You have to ensure that force_instantiate(foo<X>::bar) gets called, of
> course.

Of course :-) What I did was this:

template<class Derived, class Base>
BOOST_DLLEXPORT const void * void_cast_register(
     const Derived * /* dnull = NULL */,
     const Base * /* bnull = NULL */
){
     boost::python::detail::force_instantiate(
         void_cast_detail::void_caster_primitive<
             const Derived,
             const Base
>::instance);
     return & void_cast_detail::void_caster_primitive<
         const Derived,
         const Base
>::instance;
}

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

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