How are objects passed to functions C++, by value or by reference?
<p>Coming from C#, where class instances are passed by reference (that is, a copy of the reference is passed when you call a function, instead of a copy of the value), I'd like to know how this works in C++. In the following case, _poly = poly, is it copying the value of poly to _poly, or what? </p>

<pre><code>#include &lt;vector&gt;
using namespace std;

class polynomial {
    vector&lt;int&gt; _poly;
public:
    void Set(vector&lt;int&gt; poly);
};

void polynomial::Set(vector&lt;int&gt; poly) {
    _poly = poly;                             &lt;----------------
}
</code></pre>
