I have a c++ template class of this kind (this is a simpler version):
template
class Vector {
public:
Vector(int size) {vec.resize(size);}
~Vector() {}
private:
std::vector vec;
}
In c++ I build a Vector object like this: Vector vec_float; or Vector vec_int; and c++ knows that T=float or T=int because I specified it ( and ).
I bind this class with pybind11 both for T=int and T=float.
When I build a Vector object in python, how can python know if T=float or T=int?
I have this doubt, because, contrary to c++, in python there is no way of specifying the template T.