[pygccxml-development] indexing suite and operator==
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-06-21 20:07:45
|
Good evening. I need some help. I don't know what is preferred behaviour of py++ in next situation. In order to use indexing suite, class X should define operator==. What py++ should do when it found usage of std::vector< X >? The generated code class_< vector< X > >( "Xs" ) .def( vector_indexing_suite< vector<X> > ); will not compile. There are 2 options: 1. py++ will not generate that code. Very bad option, because user will get wrong filling, that created bindings just work. All functions that use vector< X > are non-callable from Python. 2. Generate code. The bad side of this approach is compiler error message - it is pretty big and scaring. It can confuse any user, but at least he will aware of the problem. py++ can generate some comment within source code that will help the user to understand the problem quickly. Thoughts? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |