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

Add compile-time checks w.r.t. is_primary or existance of get_secondary_event() #3027

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

muffgaga
Copy link
Contributor

@muffgaga muffgaga commented Dec 1, 2023

That is not a polished commit, but rather just a draft showing that some more compile-time checking of the interfaces is possible without any restructuring. (Cf. discussion in PR #2988).

  • By compile-time checking for the IS_PRIMARY property, we now can drop Connection::get_secondary_event(), which could only be reached by illegal code.
  • It introduces a compile-time check on not IS_PRIMARY and the existence of the derived Connection's get_secondary_event — and it provides a compile-time error message in cases where this isn't the case.

@terhorstd terhorstd added S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation. I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Dec 15, 2023
@terhorstd terhorstd added this to In progress in Kernel via automation Dec 15, 2023
@terhorstd terhorstd changed the title Add compile-time checks w.r.t. is_primary or existance get_secondary_event() Add compile-time checks w.r.t. is_primary or existance of get_secondary_event() Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation.
Projects
Kernel
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants