Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-18 Thread Grant Tang
"Jim Bosch" wrote in message news:[email protected]... Unfortunately, there's no "best-match" type checking in Boost.Python; when trying to convert a Python object to a particular C++ type, it simply runs over a list of all the converters registered (using RTTI) for that C++ type.

Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-18 Thread Jim Bosch
On 08/18/2011 09:37 AM, Grant Tang wrote: I change my vector<> conversion(see it in my last reply) to add specialization for int, float, string etc. I added type check in convertible() function: Sorry I didn't reply to your last email earlier, but it looks like you're on the right track. H

Re: [C++-sig] question about implicit type conversion of vector to a custom type

2011-08-18 Thread Grant Tang
"Jim Bosch" wrote in message news:[email protected]... On 08/18/2011 09:37 AM, Grant Tang wrote: I change my vector<> conversion(see it in my last reply) to add specialization for int, float, string etc. I added type check in convertible() function: Sorry I didn't reply to your