Hi again,
As part of my dust library (ongoing, early alpha) I have an entity system using macros to convert types to integers at compile-time, so that collections of components can be expressed as a bitfield. When you do something like:
entity.add(new Position()); for example, that is rewritten to entity.add(new Position(), 1); where 1 is the ID for Position across the application. Then entity.get(Position) is rewritten as entity.get(1);
Annoyingly, I can also do:
entity.add(new QuadTree<Position>());
entity.add(new QuadTree<Rabbit>());
I would like QuadTree<Position> and QuadTree<Rabbit> to have two different IDs, but I can't write entity.get(QuadTree<Position>); I get the error "Unexpected )". I can only use entity.get(QuadTree), which means that the two generic types have to be treated the same in the indexer.
This is not a huge deal - I can work around it, but it seems to me like it's a bug that you can't reference a generic class like that - particularly if it's being passed into a macro function.