[C++-sig] Re: register_ptr_to_python docs and test

F. Oliver Gathmann gathmann at cenix-bioscience.com
Fri Jun 27 10:13:09 CEST 2003


> David Abrahams wrote:
>
>> That sounds great.  I think we're almost there.  Thanks for your work! 
>
> My pleasure! Here is a new version, with the latest changes. I think 
> that it is now good enough to commit. Regards, Nicodemus.


gcc 3.2.2 on Linux only stopped complaining after I inserted a
"typename" directive as shown:


>// Copyright David Abrahams 2002. Permission to copy, use,
>// modify, sell and distribute this software is granted provided this
>// copyright notice appears in all copies. This software is provided
>// "as is" without express or implied warranty, and with no claim as
>// to its suitability for any purpose.     
>#ifndef REGISTER_PTR_TO_PYTHON_HPP
>#define REGISTER_PTR_TO_PYTHON_HPP
>
>#include <boost/python/pointee.hpp>
>#include <boost/python/object.hpp>
>
>namespace boost { namespace python {
>    
>template <class P>
>void register_ptr_to_python(P* = 0)
>{
>    typedef typename boost::python::pointee<P>::type X;

              ^^^^^^^^

>    objects::class_value_wrapper<
>        P
>      , objects::make_ptr_instance<
>            X
>          , objects::pointer_holder<P,X>
>        >
>    >();
>}           
>
>}} // namespace boost::python
>
>#endif // REGISTER_PTR_TO_PYTHON_HPP
>


Regards,

Oliver







More information about the Cplusplus-sig mailing list