On Sat, Mar 20, 2010 at 11:10 PM, Maciej Sitarz <macieksit...@wp.pl> wrote: > Just one more comment... > > The constructor takes reference to vector<JobPropertyWrapper>, so I suspect > that maybe it will be filled there by some other code I don't have? So I > don't need to fill the vector, just to create it (I will ask the developers)
Right, you'd better talk with them. Boost.Python allows to export libraries without touching them, but sometimes a small library change could make you task easier. The following code works: #include <vector> struct item_t{ explicit item_t( int v) : value( v ) {} int value; protected: item_t& operator=( const item_t& other ); }; int main( int argc, const char** argv ){ std::vector< item_t > values( 10, item_t( 12 )); for( size_t i = 0; i < values.size(); ++i ){ values[ i ].value = i; } } -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig