Skip to content

Fixes to FunctionPointer and friends #28

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

Merged
merged 3 commits into from
Jun 10, 2015
Merged

Fixes to FunctionPointer and friends #28

merged 3 commits into from
Jun 10, 2015

Conversation

bogdanm
Copy link
Contributor

@bogdanm bogdanm commented Jun 8, 2015

  • Added the 'clear' method on FunctionPointerBase and FunctionPointerBind (needed by MINAR)
  • Added the function call operator in FunctionPointerBind (also needed by MINAR)
  • Restructured inheritance schema: since it is useful for FunctionPointerX and FunctionPointerBind
    to inherit various methods from FunctionPointerBase (like clear() and operator bool()),
    make them inherit publicly from FunctionPointerBase. The API user still can't instantiate a
    FunctionPointerBase directly, which is the correct behaviour.

Bogdan Marinescu added 3 commits June 8, 2015 15:00
- Added the 'clear' method on FunctionPointerBase and FunctionPointerBind (needed by MINAR)
- Added the function call operator in FunctionPointerBind (also needed by MINAR)
- Restructured inheritance schema: since it is useful for FunctionPointerX and FunctionPointerBind
  to inherit various methods from FunctionPointerBase (like clear() and operator bool()),
  make them inherit publicly from FunctionPointerBase. The API user still can't instantiate a
  FunctionPointerBase directly, which is the correct behaviour.
"warning: deleting object of polymorphic class type 'mbed::FunctionPointer0<void>'which
has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]"
@bogdanm
Copy link
Contributor Author

bogdanm commented Jun 9, 2015

@bremoran, @0xc0170, please CR.

@bremoran
Copy link
Collaborator

bremoran commented Jun 9, 2015

Still not convinced about this clear function, but I don't think we can remove the need for it without massive changes to MINAR.

With that in mind, +1

bogdanm added a commit that referenced this pull request Jun 10, 2015
Fixes to FunctionPointer and friends
@bogdanm bogdanm merged commit 5224568 into master Jun 10, 2015
@bremoran bremoran deleted the minar_fixes branch October 20, 2015 09:25
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