title: Returning void from a double function?
body: <p>I have a function which is a double and normally returns the new value for a variable, but sometimes I don't want to change the variable and I would like to signal that by returning a special value, for example void. Is that possible?</p>
  
  <p>For example:</p>
  
  <pre><code>double GetNewValue(int feature) {
      switch( feature ) {
          case TYPE1:
              return void; // or maybe use return; here?
          case TYPE2:
              return 2.343;
          default:
              return featureDefaultValue;
      }
  }
  </code></pre>
  
  <p>PS: I know I can use NaN, but I already use it as a valid value with another meaning (not yet a number is available).</p>
  
  <p>/EDIT: Thank you all for your answers, these 3 answers are all applicable to my problem and are all equally valid. I struggle right now in choosing which one I'm going to use (which will be the one I will accept, but I wish I could accept them all!).</p>