openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.84k stars 2.56k forks source link

restore default-copy-constructibility of ofEvent #7969

Closed artificiel closed 1 month ago

artificiel commented 1 month ago

this limitation was introduced around the didNotify() feature which is based on an std::atomic<bool> which is not default-copy-constructible. this was not raised as a problem because the core and builtin-addons do not inherit ofEvent in a way that triggers the copy constructors. but some addons do, which makes them incompatible.

fixed by moving the notified_ member up into ::priv, which already has custom copy constructors. this revert the copy-constructibility of ofEvent.