title: Reusing enum values in separate enum types
body: <p>Is there a way to reuse the same enum value in separate types? I'd like to be able to something like the following:</p>
  
  <pre><code>enum DeviceState { UNKNOWN, ACTIVE, DISABLED, NOTPRESENT, UNPLUGGED };
  enum DeviceType { UNKNOWN, PLAYBACK, RECORDING };
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      DeviceState deviceState = DeviceState::UNKNOWN;
      DeviceType deviceType = DeviceType::UNKNOWN;
      return 0;
  }
  </code></pre>
  
  <p>This makes sense to me, but not to the C++ compiler- it complains: <code>error C2365: 'UNKNOWN' : redefinition; previous definition was 'enumerator'</code> on line 2 of the above. Is there a correct way of doing this, or am I supposed to always use unique enum values? I can't imagine this is always possible to guarantee if I'm including someone else's code.</p>