This raises the question as to why stop at std::vector<>
? What about std::list<>
and std::array<>
?
Exposing STL classes is opening a can of worms in my opinion since their design represents a whole lot of public methods that are impractical to implement in wrapper code. Furthermore the currently supported wrapper languages (Java, Python and C#) do not support the concept of C++ const methods, so a VTK method returning any container will be necessarily mutable. I don’t think that is desirable.
I appreciate the syntactic sugar of this but surely it can be achieved via some C++ magic with existing VTK classes like vtkDataArray.