title: Default reference argument in C++
body: <p>I have class <code>mizer</code>:</p>
  
  <pre><code>class mizer {
    ...
    public:
      ...
      void getDeviation( vector&lt;double&gt;&amp;, vector&lt;int&gt;&amp; )
  ...
  };
  </code></pre>
  
  <p>with realization:</p>
  
  <pre><code>void mizer::getDeviation( vector&lt;double&gt;&amp; best_mass, vector&lt;int&gt;&amp; best_comb ){
     ...
  }
  </code></pre>
  
  <p>But sometimes I do not want to provide the second argument <code>best_comb</code>. So I want to set default or something:</p>
  
  <pre><code>void mizer::getDeviation( ..., vector&lt;int&gt;&amp; best_comb = default )
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>static vector&lt;int&gt; def();
  ...
  void mizer::getDeviation( ..., vector&lt;int&gt;&amp; best_comb = def )
  </code></pre>
  
  <p>But it is not working:</p>
  
  <pre><code>/minimizer/mizer.C:69:69: error: 
  non-const lvalue reference to   type 'vector&lt;int&gt;'  cannot bind to a value of unrelated type 'vector&lt;int&gt; ()'double mizer::getDeviation( vector&lt;double&gt;&amp;  best_mass, vector&lt;int&gt;&amp; best_comb=def ){
  </code></pre>
  
  <p>How to set default <code>vector</code> reference variable?</p>