Bug #1252
closed
Face::operator= does not work
Added by Junxiao Shi almost 11 years ago.
Updated almost 11 years ago.
Description
Steps to reproduce:
- construct face1 and face2
- call
face1->operator=(face2)
- destruct face2
- invoke face2->setInterestFilter
Expected: no error
Actual: segfault
Files
Face::operator= should be disabled to resolve this bug.
CORRECTION
Steps to reproduce:
- construct face1 and face2
- call
face1->operator=(face2)
- destruct face2
- invoke
face1->setInterestFilter
Face must be nocopyable. There is no valid reason (and no clear logic how) face can be safely copied.
Face class should derive from boost::noncopyable
, so that copy constructor and operator=
are disabled.
- Status changed from New to Code review
- Assignee set to Alex Afanasyev
- % Done changed from 0 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF