I\'m working on a data-oriented entity component system where component types and system signatures are known at compile-time.
An entity>
Have you considered the following solution? Each signature will have a container of entities that match that signature.
When a component is added or removed you need to update the relevant signature container.
Now the function can simply go to the signature entity container and execute the function for each entity.