Skip to content

Instantly share code, notes, and snippets.

@adam4813
Created February 12, 2017 16:55
Show Gist options
  • Save adam4813/d7db03a3cbe44976410201a939cc4b2e to your computer and use it in GitHub Desktop.
Save adam4813/d7db03a3cbe44976410201a939cc4b2e to your computer and use it in GitHub Desktop.
.hpp
template <int>
struct ComponentList {
static std::set<eid> entities;
};
template<> std::set<eid> ComponentList<proto::Component::kLuaScript>::entities;
template<> std::set<eid> ComponentList<proto::Component::kPosition>::entities;
template<> std::set<eid> ComponentList<proto::Component::kOrientation>::entities;
.cpp
auto test1 = ComponentList<proto::Component::kLuaScript>::entities.begin();
auto test2 = ComponentList<proto::Component::kPosition>::entities.begin();
auto test3 = ComponentList<proto::Component::kOrientation>::entities.begin();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment