I have been using boost::signals2
for some time now in my projects. To my shame, I still do not understand how they are implemented under the hood. My problems already start at the very definition of a signal. How is a definition such as
boost::signals2::signal< void (bool, double) >
handled? I can see from the implementation details that the signature becomes a template parameter that is aptly named Signature
. However, I do not understand the syntax. Is this syntax permitted by the C++ standard? How can a signal "store" the function signature when it is provided in this form?
I already tried looking at the sources, but was unable to find an explanation for this syntax. Any help would be appreciated.