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

Implement Signal #1012

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

Implement Signal #1012

wants to merge 22 commits into from

Conversation

drewr95
Copy link
Contributor

@drewr95 drewr95 commented Jan 12, 2025

Initial implementation of signal for #666

I implemented something very similar to this on other software and thought this would be useful for this project. I would like to use this version over my other implementation.

Some other things that could be added at some point is being able to pass in an aggregator or some kind of module that can act on all the signals (think sumnation, product, etc).

@drewr95 drewr95 changed the title Implement Signal Library Implement Signal Jan 12, 2025
///\todo Support for return types other than void (aggregate etc.)
//***************************************************************************
template <typename T, size_t LENGTH, typename TSlot = etl::delegate<T>>
class signal final
Copy link
Contributor

@jwellbelove jwellbelove Jan 13, 2025

Choose a reason for hiding this comment

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

If this class is meant to support C++03 then you should use ETL_FINAL.

You can check basic compatibility from C++03 to C++20 by running the script etl/test/run-syntax-checks.sh on Linux. You need both GCC and clang installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My primary goal was to be c++14 compliant since that is what I use, but I tried to be as lower compliant as possible. I didn't know that script existed, thanks, I'll run it and see what I find :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants