nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Add compile-time checks w.r.t. `is_primary` or existence of `get_secondary_event()`

Open muffgaga opened this issue 2 years ago • 1 comments

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.

muffgaga avatar Dec 01 '23 18:12 muffgaga

@muffgaga Could you respond to the remarks in the code review? Also, could you merge master into your branch and fix the conflicts that have arisen since you created this PR?

heplesser avatar Sep 09 '24 08:09 heplesser