Skip to content

Instantly share code, notes, and snippets.

@EricWF
Created March 29, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricWF/9862440 to your computer and use it in GitHub Desktop.
Save EricWF/9862440 to your computer and use it in GitHub Desktop.
enum class my_big_enum
{
/* imagine this changes a lot */
};
#include "stores_enum.hpp"
// we actually need the fields here.
#include "enum.hpp"
void stores_enum::method_that_uses_enum()
{
m_e = my_big_enum::value;
}
// no need to include enum.hpp, we don't use it here
// We can just re-declare it.
enum class my_big_enum;
struct stores_enum
{
void method_that_uses_enum();
my_big_enum m_e;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment