title: Wrap std::vector of std::vectors, C++ SWIG Python
body: <p>I want to wrap a C++ vector of vectors to Python code by using SWIG.</p>
  
  <p>Is it possible to wrap this type of vector of vectors?</p>
  
  <pre><code>std::vector&lt;std::vector&lt;MyClass*&gt;&gt;;
  </code></pre>
  
  <p>In the interface file <code>MyApplication.i</code> I added these lines:</p>
  
  <pre><code>%include "std_vector.i"
  %{ 
  #include &lt;vector&gt; 
  %} 
  
  namespace std {
     %template(VectorOfStructVector) vector&lt;vector&lt;MyClass*&gt;&gt;;
  }
  </code></pre>
  
  <p>But, I'm getting an Error when SWIG is executed. I'm able to wrap this type (using reference to the vector):</p>
  
  <pre><code> std::vector&lt;std::vector&lt;MyClass*&gt;*&gt;;
  </code></pre>
  
  <p>But, it's not working properly, I cannot access  the items. That's why I'm interested in this type (without the reference):</p>
  
  <pre><code> std::vector&lt;std::vector&lt;MyClass*&gt;&gt;;
  </code></pre>
  
  <p>Any ideas?</p>