[C++-sig] Py++ and inner template classes

Pertti Kellomäki pertti.kellomaki at tut.fi
Mon Apr 28 14:58:16 CEST 2008


Can Py++ expose inner classes that come from templates?
I have code which is basically equivalent to the following:

class Outer {
public:
   template <typename T>
   class Inner {
   public:
     Inner(T);
   };
   typedef Inner<int> Inner_int;
   Inner_int f();
};

If I use the Py++ module_builder to create bindings for
the code, the class Inner_int is not exposed, and I get
the warning

WARNING: Outer::Inner<int> [class declaration]
 > execution error W1040: The declaration is unexposed, but there are 
other declarations, which refer to it. This
 > could cause "no to_python converter found" run time error. 
Declarations:   Outer::Inner<int> Outer::f() [member
 > function]
-- 
Pertti



More information about the Cplusplus-sig mailing list