title: C++ - returning a const vector of const vectors of const objects
body: <p>I'm parsing a file and creating a vector of a vector of Foo objects.</p>
  
  <pre><code>vector&lt; vector&lt;Foo*&gt; &gt; mFooVectors;
  </code></pre>
  
  <p>I have to allow access with the following getFoos function. </p>
  
  <pre><code>const vector&lt;const Foo*&gt;&amp;         getFoos(int index); 
  </code></pre>
  
  <p>So I created a const declaration of my vector:</p>
  
  <pre><code>const vector&lt; const vector&lt;const Foo*&gt; &gt; mConstFooVectors;
  </code></pre>
  
  <p>Now how do I do mConstFooVectors = mFooVectors so I can return a reference to mConstFooVectors?</p>