xparq / Out_of_Nothing

Versatile entity-based simulation & visualization/gamification framework PROTOTYPE
0 stars 0 forks source link

HUD Bindings: std::any is slow #496

Open xparq opened 8 months ago

xparq commented 8 months ago

https://meetingcpp.com/blog/items/How-does-std-any-compare-to-std-variant-.html

The (end of the) post also seems to suggest that my brute-force direct type recovery code (in op<<) is probably still the best approach one could hope for in this context.


But, why isn't this a variant, again? Even if the cargo types are all just pointers, and the type tag still kinda has to be used manually, it feels like a natural choice. And