#1628 SGrid: SIntersection::operator= must not require this->grid == other.grid
Metadata
Property | Value |
---|---|
Reported by | Ansgar Burchardt (burchardt@igpm.rwth-aachen.de) |
Reported at | Apr 22, 2015 11:07 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Apr 22, 2015 13:52 |
Closed by | Markus Blatt (markus@dr-blatt.de) |
Closed at | Apr 22, 2015 13:52 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | In the master with comment that request a cherry-pick to release branch |
Description
It should be possible to default-construct an intersection and then assign a useful value to it:
+--- | // check default-constructibility and copy constructor | IntersectionIterator idefault; | idefault = view.iend( *eIt ); +---[ testintersectionit.hh ]
However SIntersection::operator= currently has:
+--- | /* We can't assign the grid */ | assert(grid == other.grid); +---[ sgrid.hh ]
The attached patch drops the assert and copies the "grid" pointer as well.
With the patch applied, the test suite passes again for me.
Ansgar