[C++-sig] [boost.python] Can't import a wrapped template class
Alex Mohr
amohr at pixar.com
Fri Oct 26 20:27:15 CEST 2012
On 10/26/2012 11:16 AM, Paul O. Seidon wrote:
> would do that. Should I try
>
> dont_care = _Variable<double>();
>
> in main.cpp? Looks a bit strange, but would force the compiler to generate
> code for sure.
You either need to inline the ctor in the header or do an explicit
instantiation of _Variable<double> somewhere. I suggest you read up on
"explicit instantiation" and c++ templates in general. This problem
isn't related to boost.python.
Alex
More information about the Cplusplus-sig
mailing list