[C++-sig] Pyste typedef problems...

Giulio Eulisse giulio.eulisse at cern.ch
Mon Mar 31 16:35:20 CEST 2003


Tring to pystify

---CUT-HERE---
typedef unsigned int B;

class A
{
        B b;
public:
        B &f(void){return b;};
};
---CUT-HERE---

with pyste file:

---CUT-HERE---
A=Class("A","A.h")
---CUT-HERE---

gets to the following error, when compiling the output c++ code...




/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/object/make_instance.hpp: In
   static member function `static PyObject*
   boost::python::objects::make_instance_impl<T, Holder,
   Derived>::execute(Arg&) [with Arg = unsigned int*, T = unsigned int,
Holder
   = boost::python::objects::pointer_holder<unsigned int*, unsigned
int>,
   Derived = boost::python::objects::make_ptr_instance<unsigned int,
   boost::python::objects::pointer_holder<unsigned int*, unsigned int>
>]':
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/to_python_indirect.hpp:62:   instantiated from `static PyObject* boost::python::detail::make_reference_holder::execute(T*) [with T = unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:19:   instantiated from `Generator::result_type boost::python::detail::unwind_type_cv(U*, boost::python::detail::cv_tag<false, false>, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:48:   instantiated from `Generator::result_type boost::python::detail::unwind_ptr_type(U*, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:58:   instantiated from `static Generator::result_type boost::python::detail::unwind_helper<is_ptr>::execute(U, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int*, bool is_ptr = true]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:77:   instantiated from `Generator::result_type boost::python::detail::unwind_type(const U&, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int*]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:26:   instantiated from `Generator::result_type boost::python::detail::unwind_type_cv(const U*, boost::python::detail::cv_tag<true, false>, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:48:   instantiated from `Generator::result_type boost::python::detail::unwind_ptr_type(U*, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = const unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:69:   instantiated from `static Generator::result_type boost::python::detail::unwind_helper<false>::execute(U&, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = const unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/unwind_type.hpp:77:   instantiated from `Generator::result_type boost::python::detail::unwind_type(const U&, Generator*) [with Generator = boost::python::detail::make_reference_holder, U = unsigned int]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/to_python_indirect.hpp:103:   instantiated from `PyObject* boost::python::to_python_indirect<T, MakeHolder>::operator()(T) const [with T = B&, MakeHolder = boost::python::detail::make_reference_holder]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/invoke.hpp:93:   instantiated from `PyObject* boost::python::detail::invoke(boost::python::detail::mem_fn_tag, RC*, F&, TC&) [with RC = boost::python::to_python_indirect<B&, boost::python::detail::make_reference_holder>, F = B&(A::*)(), TC = boost::python::detail::nullary<boost::python::arg_from_python<A&> >]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/detail/caller.hpp:162:   instantiated from `PyObject* boost::python::detail::caller_arity<1>::impl<F, ConverterGenerators, Policies, Sig>::operator()(PyObject*, PyObject*) [with F = B&(A::*)(), ConverterGenerators = boost::python::detail::args_from_python, Policies = boost::python::return_internal_reference<1, boost::python::default_call_policies>, Sig = boost::mpl::list2<B&, A&>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/function/function_template.hpp:117:   instantiated from `static R boost::detail::function::function_obj_invoker2<FunctionObj, R, T0, T1>::invoke(boost::detail::function::any_pointer, T0, T1) [with FunctionObj = boost::python::detail::caller<B&(A::*)(), boost::python::detail::args_from_python, boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::mpl::list2<B&, A&> >, R = PyObject*, T0 = PyObject*, T1 = PyObject*]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/function/function_template.hpp:481:   instantiated from `void boost::function2<R, T0, T1, Allocator>::assign_to(FunctionObj, boost::detail::function::function_obj_tag) [with FunctionObj = boost::python::detail::caller<B&(A::*)(), boost::python::detail::args_from_python, boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::mpl::list2<B&, A&> >, R = PyObject*, T0 = PyObject*, T1 = PyObject*, Allocator = std::allocator<boost::function_base>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/function/function_template.hpp:432:   instantiated from `void boost::function2<R, T0, T1, Allocator>::assign_to(Functor) [with Functor = boost::python::detail::caller<B&(A::*)(), boost::python::detail::args_from_python, boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::mpl::list2<B&, A&> >, R = PyObject*, T0 = PyObject*, T1 = PyObject*, Allocator = std::allocator<boost::function_base>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/function/function_template.hpp:293:   instantiated from `boost::function2<R, T0, T1, Allocator>::function2(Functor, boost::detail::function::enable_if<boost::type_traits::ice_not<boost::is_same<Functor, int>::value>::value, int>::type) [with Functor = boost::python::detail::caller<B&(A::*)(), boost::python::detail::args_from_python, boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::mpl::list2<B&, A&> >, R = PyObject*, T0 = PyObject*, T1 = PyObject*, Allocator = std::allocator<boost::function_base>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/make_function.hpp:61:   instantiated from `boost::python::api::object boost::python::detail::make_function_aux(F, const CallPolicies&, const ConverterGenerators&, const Sig&, const boost::python::detail::keyword_range&, NumKeywords) [with F = B&(A::*)(), CallPolicies = boost::python::return_internal_reference<1, boost::python::default_call_policies>, ConverterGenerators = boost::python::detail::args_from_python, Sig = boost::mpl::list2<B&, A&>, NumKeywords = boost::mpl::int_<0>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/make_function.hpp:90:   instantiated from `boost::python::api::object boost::python::make_function(F, const CallPolicies&, const Keywords&) [with F = B&(A::*)(), CallPolicies = boost::python::return_internal_reference<1, boost::python::default_call_policies>, Keywords = boost::python::detail::keywords<0>]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/class.hpp:395:   instantiated from `void boost::python::class_<T, X1, X2, X3>::def_impl(const char*, Fn, const Helper&, ...) [with Fn = B&(A::*)(), Helper = boost::python::detail::def_helper<boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, T = A, X1 = boost::python::detail::not_specified, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/class.hpp:459:   instantiated from `void boost::python::class_<T, X1, X2, X3>::def_maybe_overloads(const char*, Fn, const A1&, ...) [with Fn = B&(A::*)(), A1 = boost::python::return_internal_reference<1, boost::python::default_call_policies>, T = A, X1 = boost::python::detail::not_specified, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]'
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/class.hpp:253:   instantiated from `boost::python::class_<T, X1, X2, X3>& boost::python::class_<T, X1, X2, X3>::def(const char*, A1, const A2&) [with A1 = B&(A::*)(), A2 = boost::python::return_internal_reference<1, boost::python::default_call_policies>, T = A, X1 = boost::python::detail::not_specified, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]'
typedef_confusion.cpp:14:   instantiated from here
/afs/cern.ch/sw/lcg/external/Boost/1.30.0/rh73_gcc32/boost/python/object/make_instance.hpp:23: `sizeof'
   applied to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>'



Any idea?

Ciao,
Giulio





More information about the Cplusplus-sig mailing list