Auto-detect non-assignable classes
Classes with references or const data are now marked as 'noassign'. This renders many explicit `private: operator=` declarations redundant.
This commit is contained in:
parent
073d144b0e
commit
03dd2ec39d
7 changed files with 11 additions and 14 deletions
|
|
@ -74,8 +74,10 @@ class Bar {
|
|||
Foo *testFoo(int a, Foo *f) {
|
||||
return new Foo(2 * a + (f ? f->num : 0) + fval.num);
|
||||
}
|
||||
/* Const member data means this class can't be assigned.
|
||||
private:
|
||||
Bar& operator=(const Bar&);
|
||||
*/
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue