title: how can I copy vector in c++ by reference O(1)?
body: <p>I want to have class scope alias to the vector from an argument. </p>
  
  <p>For exapmale:</p>
  
  <pre><code>class Solution {
  private:
       vector&lt;int&gt; b; // I want that &amp;b = a, where a from function solve
       int f(int i) {
            // here I want to use vector&lt;int&gt; a, 
            // not passing it as a function argument every time
       }
  public:
       int solve(vector&lt;int&gt;&amp; a) {
            // here I want to do smth like b = a; which works for O(1)
       }
  };
  </code></pre>
  
  <p>Unfortunatelly, I can't just declare <code>vector&lt;int&gt; &amp;b;</code> , because of the error:
  <code>declaration of reference variable 'b' requires an initializer</code></p>
  
  <p>Could you please, explain how to do it in C++11/14?</p>
  
  <p>Update: I can't change the declaration of <code>int solve(vector&lt;int&gt;&amp; a)</code>, the interface provided from outside.</p>
  
  <p>Update: I've changed the code to the more explicit. Looks like I shouldn't do again because in answers and comments people use original variable names. I'm sorry, don't have much experience with StackOverflow.   </p>