title: Separate enum declaration and definition in C++11
body: <p>There are several questions on these forums about the inheritance of C++ enums for extending (which is actually the thing without the logic). But what about inheritance just for setting specific values?
  Currently, there is something like the following in my code:</p>
  
  <pre class="lang-c prettyprint-override"><code>//lib_impl.h
  enum class X {
      a = 13, // these values are
      b = 42  // implementation dependent
  }
  
  //lib.h
  #include "lib_impl.h"
  
  void some_func(X param) {
      X x = X::a;
  }
  </code></pre>
  
  <p>I just want to avoid the dependecy of the 'lib' from its implementation. Probably, something other than enums must be used for that. As even in C++11 we have the ability only to declare forward enum name, but not its enumerators:</p>
  
  <pre class="lang-c prettyprint-override"><code>//lib.h
  enum class X { a, b } // this is both declaration and definition, unfortunately
  
  void some_func(X param) {
      X x = X::a;
  }
  
  //lib_impl.h
  #include "lib.h"
  
  enum class X { // redefenition, compilation error
      a = 13,
      b = 42 
  }
  </code></pre>
  
  <p>What is the best compile-time solution for such problems?</p>
  
  <p>--</p>
  
  <p><strong>As it seems to be unimplementable in c++, what is the most common way to resolve such issues? Leave the dependency of the 'lib' from the 'impl' as it is? Probably, 'impl' could be split into two parts, small which will be included before the 'lib.h' and other, bigger, to be included after it. Is it ok or I need to abandon the use of enums  in favor of abstract classes?</strong></p>