title: How to store some kind of "null" in C++ double or int variable?
body: <p>I have a class that looks like this</p>
  
  <pre><code>struct A {
       double a1;
       int b1;
       double a2;
       int b2;
  };
  </code></pre>
  
  <p>I have to read off of a file values for <code>a1</code>, <code>b1</code>, <code>a2</code>, and <code>b2</code>. Most of the time all four numbers are on the file, but sometimes there are only two numbers. </p>
  
  <p>When there are two numbers, I want to store the values in <code>a1</code>, and <code>b1</code> and I want to store "nothing" in <code>a2</code> and <code>b2</code>. If <code>a2</code> and <code>b2</code> were pointers, I could just assign them to be <code>nullptr</code>, but they are not pointers. </p>
  
  <p><strong>Is there something I can store in <code>double</code> and <code>int</code> variables to indicate that 'nothing' is stored?</strong></p>
  
  <p>I know <code>Boost.Optional</code> is available, but I'm trying to avoid that library.</p>