Repository navigation
Use variadic templates for tl::event - #2478
Closed
nikosavola wants to merge 4 commits into
Closed
nikosavola wants to merge 4 commits into
nikosavola wants to merge 4 commits into
Conversation
- deleting an event from a receiver of a nested emission only flagged the innermost emission, so the outer one kept calling receivers and touched freed members - every active emission is tracked with a guard object, which also covers a receiver that deletes the event and then throws - copying an event does not copy its active emissions
- the six macro instantiations of the event classes become variadic templates (about 140 lines less), `tlEventsVar.h` is gone - stacked on the nested emission fix
nikosavola
marked this pull request as draft
October 1, 2026 19:25
Collaborator
|
Maybe it's time to switch to variadic templates. But even today, RHEL 7 is still used by many enterprise installations which comes with gcc 4.8 - the first version that supported variadic templates. And there is even Qt4 in place. Matthias |
Contributor
Author
|
I tested this on CentOS 7 with gcc 4.8.5 and -std=c++11. tl builds without Qt and all tlEvents tests pass. I did not try a full Qt4 build. But this is plain C++ in tl, and Qt4 and Qt5 builds already use -std=c++11. So RHEL 7 should be fine. It is your call. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tlEventsVar.his gone