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

std::function in Conversion System #79

Merged
merged 2 commits into from
Feb 26, 2022

Conversation

ardasener
Copy link
Contributor

The conversion system originally used ConversionFunctor pointers which had the following problems:

  • Required manual memory allocation on our part
  • Made the destructor complicated (since the user could pass multiple copies of the same objects we had to be careful about double deletion)
  • Required all converters to conform to this style

The new system uses std::function objects instead as a result:

  • The user can define converters in many different ways (functions, static member functions, lambda expressions etc.)
  • No need to manage the memory on our side

@ardasener ardasener added state: review needed type: fix Iterations on existing features or infrastructure. Optimizations, refactoring, etc. labels Feb 26, 2022
@AmroAlJundi AmroAlJundi added state: approved Approved to proceed. Ready to be merged and removed state: review needed labels Feb 26, 2022
@ardasener ardasener merged commit 4680ad9 into develop Feb 26, 2022
@ardasener ardasener deleted the feature/converter_std_function branch February 26, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: approved Approved to proceed. Ready to be merged type: fix Iterations on existing features or infrastructure. Optimizations, refactoring, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants