Skip to content

Fix #38#39

Merged
ptsouchlos merged 2 commits intoptsouchlos:developfrom
jtdavis777:feature/move_semantics
Mar 12, 2025
Merged

Fix #38#39
ptsouchlos merged 2 commits intoptsouchlos:developfrom
jtdavis777:feature/move_semantics

Conversation

@jtdavis777
Copy link
Contributor

@jtdavis777 jtdavis777 commented Mar 11, 2025

Implemented a fix for #38 such that if an event handler expects a reference to the event, it is given one without making a copy.

R-value references and value type parameters are handed copies.

This is also technically a breaking change, as EventTypes are now inferred by the event handler function traits, which will break current implementations but for the better.

…hould result in much faster event handling when handlers expect references to the event arguments.

Downside is this change is a breaking change and likely requires a major version update.

other changes:
noexcept correctness
use scoped_lock over unique_lock
@ptsouchlos
Copy link
Owner

I like the direction this is going, but will these changes require C++20 now?

@jtdavis777
Copy link
Contributor Author

I don't believe so -- you have the std set to 17 in the main cmakelists.txt and it all compiled. some older compilers may have issues?

@ptsouchlos ptsouchlos self-requested a review March 12, 2025 11:57
Copy link
Owner

@ptsouchlos ptsouchlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for this!

@ptsouchlos ptsouchlos merged commit 7dd2cd0 into ptsouchlos:develop Mar 12, 2025
21 checks passed
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