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:
Seth R Johnson 2019-02-14 07:18:33 -05:00
commit 03dd2ec39d
7 changed files with 11 additions and 14 deletions

View file

@ -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&);
*/
};
%}