Initialize ref. field with ref. parameter: Is a copy made?
<p>I am wondering if a copy is made in the following situation, or if both references will point to the same object. Consider an class with a single const ref field which is initialized from const ref parameter:</p>

<pre><code>class Foo {
 public:
  Foo(const vector&lt;double&gt;&amp; the_doubles) : my_doubles(the_doubles) {}
 private:
  const vector&lt;double&gt;&amp; my_doubles;
}
</code></pre>

<p>So, will my_doubles point to the same vector that was passed in to the constructor, or will a copy be created?</p>
