Quote from: https://skypjack.github.io/2019-02-14-ecs-baf-part-1/
class family { static std::size_t identifier() noexcept { static std::size_t value = 0; return value++; } public: template<typename> static std::size_t type() noexcept { static const std::size_t value = identifier(); return value; } }; This is the code required to generate the identifier for a given type when needed:
const auto id = family::type<my_type>(); The drawback of this implementation is that it makes use of static local variables and static functions. Therefore, it doesn’t work well across boundaries on some platforms. On the other side it’s straightforward and quite easy to use and to understand.
I have no idea why it doesn't work well on some platfroms?
What was meant by "across boundaries"?