Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructors for generated Obj classes should be defaulted if there are no relations #203

Closed
tmadlener opened this issue Aug 6, 2021 · 1 comment · Fixed by #217
Closed

Comments

@tmadlener
Copy link
Collaborator

Currently the ~Obj destructor is generated unconditionally and is defined as (sketched)

~Obj() {
  // deal with OneToManyRelations and VectorMembers
  // deal with OneToManyRelations
}

Hence, if there are no relations defined for a datatype it could simply be declared as

virtual ~Obj() = default;

instead of implementing an empty destructor.

@tmadlener
Copy link
Collaborator Author

The assignment operator for the user facing classes could make use of the "copy-and-swap" idiom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant