Skip to content

Conversation

Lipt0nas
Copy link
Member

They are implemented as explicit funtions, in addition deleted defaulted asignment operators and copy constructors, as they allowed illegal construction of objects leading to double frees

They are implemented as explicit funtions, in addition deleted defaulted asignment operators
and copy constructors, as they allowed illegal construction of objects leading to double frees

Signed-off-by: Martynas Gurskas <[email protected]>
Copy link
Contributor

@arg0d arg0d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I'm always concerned with adding more auto generated names, e.g. hash. These kind of names might collide with user defined names in an object.

@Lipt0nas
Copy link
Member Author

Lipt0nas commented Dec 1, 2023

Fair point about name collisions, could rename the hash function to to_hash instead, it doesn't fix the problem, but could perhaps have less of a chance for collisions

@arg0d
Copy link
Contributor

arg0d commented Dec 1, 2023

You can leave it as is, I'm just pointing out that we should be mindful about these auto generated names. I don't think its possible to avoid having auto generated names in all cases.

@Lipt0nas Lipt0nas merged commit d9e2c55 into main Dec 1, 2023
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 this pull request may close these issues.

2 participants