C++ assignment operator - compiler generated or custom?
<p>I have a medium complex  C++ class which holds a set of data read from disc. It contains an eclectic mix of floats, ints and structures and is now in general use. During a major code review it was asked whether we have a custom assignment operator or we rely on the compiler generated version and if so, how do we know it works correctly? Well, we didn't write a custom assignment and so a unit test was added to check that if we do:</p>

<pre><code>CalibDataSet datasetA = getDataSet();
CalibDataSet dataSetB = datasetA;
</code></pre>

<p>then datasetB is the same as datasetA. A couple of hundred lines or so. Now the customer inists that we cannot rely on the compiler (gcc) being correct for future releases and we should write our own. Are they right to insist on this?</p>

<p>Additional info:</p>

<p>I'm impressed by the answers/comments already posted and the response time.Another way of asking this question might be:
When does a POD structure/class become a 'not' POD structure/class?</p>
