The assignment operator in the C++ API was forbidden for the latest 6.5 release. In previous versions, the assignment operator was not explicitly declared, which means a default version of it would be provided by the compiler (see
for more details).
However, the default version can lead to a crash because it only performs a shallow copy of the underlying pointer to the model rather than a deep copy of the model itself. Calling the destructor for one of the copies frees the underlying pointer and leaves the other copy with a pointer that is no longer invalid. See
https://groups.google.com/forum/#!topic/gurobi/FszoX0-Tx1I for an example of where this was leading to a crash.
GRBModel modelB(modelA);
// or
GRBModel modelC = modelA;
If you need a shallow copy, use a reference or a pointer. For example,
GRBModel &modelD = modelA;
// or
GRBModel *modelE = &modelA;