3 ms·
Even most meta programming is not extremely difficult, unless we're talking boost level stuff, and more importantly it allows you to do super powerful interface
by rubber_duck 10y ago
Even most meta programming is not extremely difficult, unless we're talking boost level stuff, and more importantly it allows you to do super powerful interfaces for your API that are trivial to use (the implementation might get complex but consumption shouldn't be).
Like say you have a collection of entities where each entity can have one or more components of different types. Now you want to find all entities with components A, B, C and the returned value should have typed references to components - it gets a bit hairy to implement but it's trivial to use and efficient.