[C++-sig] Raoul Gough's container suite with svn boost-trunkboost.python?

John Reid j.reid at mail.cryst.bbk.ac.uk
Fri Feb 29 14:43:41 CET 2008


Nikolay Mladenov wrote:
> I found it,
> 
> the postcall_override template needs to have the following line
> 
> typedef typename Policy::extract_return_type extract_return_type;
> 
Do you mean I should insert that line as follows?

   namespace detail {
     template<typename Policy>
     struct postcall_override
     {
       // This class overrides the Policy's postcall function and
       // result_conveter to handle the list returned from get_slice.
       // The Policy's result_converter is removed, since it gets
       // applied within get_slice. Our postcall override applies the
       // original postcall to each element of the Python list returned
       // from get_slice.

       typedef typename Policy::extract_return_type extract_return_type; 

       typedef boost::python::default_result_converter result_converter;
       typedef typename Policy::argument_package argument_package;

       postcall_override (Policy const &p);

       bool precall (PyObject *args);
       PyObject* postcall (PyObject *args, PyObject *result);

     private:
       Policy m_base;
     };
   }

In my version of boost/python/suite/indexing/slice_handler.hpp this is 
inserted on line 63.

If I do this I get the following error:
/alma/home/john/software/boost/boost-trunk/boost/python/suite/indexing/slice_handler.hpp:63: 
error: 'typename 
boost::python::return_value_policy<boost::python::return_by_value, 
boost::python::default_call_policies>::extract_return_type' names 
'template<class Sig> struct 
boost::python::default_call_policies::extract_return_type', which is not 
a type


Any help appreciated,
John.







More information about the Cplusplus-sig mailing list