title: Can an enumerator be defined in terms of other enumerators within the same enum type?
body: <p>For the sake of curiosity, I am experimenting this:</p>
  
  <pre><code>enum RxqType
  {
      A = (1 &lt;&lt; 0),
      B = (1 &lt;&lt; 1),
      C = (A | B),
      D = A+B+C
  };
  </code></pre>
  
  <p>Enumerator C and D are defined in terms of earlier enumerators. It is unusual so I am not sure whether it is safe. I can find no example about it through Google (maybe overlook though).</p>
  
  <p>It seems to be fine when I <code>printf</code> or <code>cout</code> <code>C</code> and <code>D</code> on Visual C++ 2013 and MinGW. But I am worrying whether it is standard conforming, and whether it triggers undefined behaviours.</p>
  
  <p>Can anyone answer to my worry about standard conformance and undefined behaviour? And is there anything else I have to concern?</p>