title: Does this function have explicit return values on all control paths?
body: <p>I have a <a href="https://en.wikipedia.org/wiki/Heaviside_step_function" rel="noreferrer">Heaviside step function</a> centered on unity for any data type, which I've encoded using:</p>
  
  <pre><code>template &lt;typename T&gt;
  int h1(const T&amp; t){
     if (t &lt; 1){
         return 0;
     } else if (t &gt;= 1){
         return 1;
     }
  }
  </code></pre>
  
  <p>In code review, my reviewer told me that there is not an explicit return on all control paths. And the compiler does not warn me either. But I don't agree; the conditions are mutually exclusive. How do I deal with this?</p>