A naive header-only implementation of delegates in c++. Insipred by the Unreal Engine delegate system. For anyone looking to do the same, I recommend these two articles:
My goals were to:
- Make it as simple, and with as clean a syntax as possible
- Be able to bind any functions to it, including:
- Member functions
- Static member functions
- Global functions
- Lambdas
- Support any number of parameters
To use, simply include /GioDelegates/Delegate.h
TBD...
You can find all examples here /GioDelegates/GioDelegateExamples.cpp
- Unbind specific delegate (via handle?)
- Remove by object