List Info

Thread: Raoul Gough's container suite with svn boost-trunk boost.python?




Raoul Gough's container suite with svn boost-trunk boost.python?
country flaguser name
United Kingdom
2007-10-11 05:05:16
Has anyone tried using Raoul's container suite with the svn
boost-trunk?

I'm getting the following error:

C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(236) 
: error C2903: 'extract_return_type' : symbol is neither a
class 
template nor a function template
 
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(232) 
: while compiling class template member function 
'boost::python::detail::py_func_sig_info 
boost::python::detail::caller_arity<2>::impl<F,Poli
cies,Sig>::signature(void)'
         with
         [
             F=boost::python::list (__cdecl 
*)(std::vector<biopsy::binding_hit>
&,boost::python::indexing::slice),
 
Policies=boost::python::indexing::detail::postcall_override&
lt;boost::python::indexing::default_container_policies>,
 
Sig=boost::mpl::vector3<boost::python::list,std::vector&l
t;biopsy::binding_hit> 
&,boost::python::indexing::slice>
         ]

So the problem seems to be there is no extract_return_type
in 
boost::python::indexing::detail::postcall_override<boost:
:python::indexing::default_container_policies>

If I remember correctly, I've installed Roman's version by
copying it 
into boost/python/suite/indexing

John.

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
country flaguser name
Canada
2007-10-11 11:20:07
This error is related to the documentation patch which I
recently
submited.
I will look into it.

Nikolay

John Reid wrote:
> 
> Has anyone tried using Raoul's container suite with the
svn boost-trunk?
> 
> I'm getting the following error:
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(236)
> : error C2903: 'extract_return_type' : symbol is
neither a class
> template nor a function template
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(232)
> : while compiling class template member function
> 'boost::python::detail::py_func_sig_info
>
boost::python::detail::caller_arity<2>::impl<F,Poli
cies,Sig>::signature(void)'
>          with
>          [
>              F=boost::python::list (__cdecl
> *)(std::vector<biopsy::binding_hit>
&,boost::python::indexing::slice),
> 
>
Policies=boost::python::indexing::detail::postcall_override&
lt;boost::python::indexing::default_container_policies>,
> 
>
Sig=boost::mpl::vector3<boost::python::list,std::vector&l
t;biopsy::binding_hit>
> &,boost::python::indexing::slice>
>          ]
> 
> So the problem seems to be there is no
extract_return_type in
>
boost::python::indexing::detail::postcall_override<boost:
:python::indexing::default_container_policies>
> 
> If I remember correctly, I've installed Roman's version
by copying it
> into boost/python/suite/indexing
> 
> John.

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
country flaguser name
Canada
2007-10-11 14:01:18
I found it,

the postcall_override template needs to have the following
line

typedef typename Policy::extract_return_type
extract_return_type;

HTH,

Nikolay

John Reid wrote:
> 
> Has anyone tried using Raoul's container suite with the
svn boost-trunk?
> 
> I'm getting the following error:
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(236)
> : error C2903: 'extract_return_type' : symbol is
neither a class
> template nor a function template
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(232)
> : while compiling class template member function
> 'boost::python::detail::py_func_sig_info
>
boost::python::detail::caller_arity<2>::impl<F,Poli
cies,Sig>::signature(void)'
>          with
>          [
>              F=boost::python::list (__cdecl
> *)(std::vector<biopsy::binding_hit>
&,boost::python::indexing::slice),
> 
>
Policies=boost::python::indexing::detail::postcall_override&
lt;boost::python::indexing::default_container_policies>,
> 
>
Sig=boost::mpl::vector3<boost::python::list,std::vector&l
t;biopsy::binding_hit>
> &,boost::python::indexing::slice>
>          ]
> 
> So the problem seems to be there is no
extract_return_type in
>
boost::python::indexing::detail::postcall_override<boost:
:python::indexing::default_container_policies>
> 
> If I remember correctly, I've installed Roman's version
by copying it
> into boost/python/suite/indexing
> 
> John.

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
country flaguser name
Canada
2007-10-11 12:50:57
Hi John,

I could not find the class postcall_override. Can you give
me a pointer?
By "Roman's version", do you mean the files that
come with py++?

Nikolay

John Reid wrote:
> 
> Has anyone tried using Raoul's container suite with the
svn boost-trunk?
> 
> I'm getting the following error:
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(236)
> : error C2903: 'extract_return_type' : symbol is
neither a class
> template nor a function template
> 
>
C:DevThirdPartyboostboost-trunkboost/python/detail/call
er.hpp(232)
> : while compiling class template member function
> 'boost::python::detail::py_func_sig_info
>
boost::python::detail::caller_arity<2>::impl<F,Poli
cies,Sig>::signature(void)'
>          with
>          [
>              F=boost::python::list (__cdecl
> *)(std::vector<biopsy::binding_hit>
&,boost::python::indexing::slice),
> 
>
Policies=boost::python::indexing::detail::postcall_override&
lt;boost::python::indexing::default_container_policies>,
> 
>
Sig=boost::mpl::vector3<boost::python::list,std::vector&l
t;biopsy::binding_hit>
> &,boost::python::indexing::slice>
>          ]
> 
> So the problem seems to be there is no
extract_return_type in
>
boost::python::indexing::detail::postcall_override<boost:
:python::indexing::default_container_policies>
> 
> If I remember correctly, I've installed Roman's version
by copying it
> into boost/python/suite/indexing
> 
> John.

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
country flaguser name
United Kingdom
2007-10-12 01:49:44
Nikolay Mladenov wrote:
> Hi John,
> 
> I could not find the class postcall_override. Can you
give me a pointer?
> By "Roman's version", do you mean the files
that come with py++?
> 
Yes. If I remember correctly they were taken from the py++
SVN 
repository. I can try and check later.

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
country flaguser name
United Kingdom
2008-02-29 07:43:41
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/suit
e/indexing/slice_handler.hpp:63: 
error: 'typename 
boost::python::return_value_policy<boost::python::return_
by_value, 
boost::python::default_call_policies>::extract_return_typ
e' names 
'template<class Sig> struct 
boost::python::default_call_policies::extract_return_type',
which is not 
a type


Any help appreciated,
John.




_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Raoul Gough's container suite with svn boost-trunkboost.python?
user name
2008-05-18 10:55:59
John Reid wrote:
> 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; 
>
>
>   
[snip]
> 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/suit
e/indexing/slice_handler.hpp:63: 
> error: 'typename 
>
boost::python::return_value_policy<boost::python::return_
by_value, 
>
boost::python::default_call_policies>::extract_return_typ
e' names 
> 'template<class Sig> struct 
>
boost::python::default_call_policies::extract_return_type',
which is not 
> a type
>   

I've recently been working on the indexing_v2 suite again,
and noticed 
that I also got an error with extract_return_type. However,
this is not 
a type but rather a member class template, so you need this
instead of a 
typedef:

      template<class Sig>
      struct extract_return_type : Policy::template
extract_return_type<Sig>
      {
      };

I've tested this on g++ 4.0.1 (darwin) and the tests compile
and work, 
so I assume this is all that's required to fix it. FWIW,
this would have 
been broken since the change to
boost/python/default_call_policies.hpp 
on 2007-09-11 for the new docstring / C++ function signature
features.

I'll post some information on building from scratch with
indexing_v2 
from the branch, but in the mean time you can probably just
apply the 
change above in your own copy of slice_handler.hpp

-- 
Cheers,
Raoul.


_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )