title: C++: Is it better to pass an enum as a value or as a const reference?
body: <p>There are sort of two related questions here:</p>
  
  <p>A) How is enum implemented?  For example, if I have the code:</p>
  
  <pre><code>enum myType
  { 
     TYPE_1,
     TYPE_2
  };
  </code></pre>
  
  <p>What is actually happening?  I know that you can treat TYPE_1 and TYPE_2 as ints, but are they actually just ints?</p>
  
  <p>B) Based on that information, assuming that the enum passed in didn't need to be changed, would it make more sense to pass myType into a function as a value or as a const reference?</p>
  
  <p>For example, which is the better choice:</p>
  
  <pre><code>void myFunction(myType x){ // some stuff }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>void myFunction(const myType&amp; x) { // some stuff }
  </code></pre>