title: C++ maximum non negative int
body: <p>Is the following going to work as expected on all platforms, sizes of int, etc? Or is there a more accepted way of doing it? (I made the following up.)</p>
  
  <pre><code>#define MAX_NON_NEGATIVE_INT ((int)(((unsigned int)-1) / 2))
  </code></pre>
  
  <p>I won't insult your intelligence by explaining what it's doing!</p>
  
  <p>Edit: I should have mentioned that I cannot use any standard classes, because I'm running without the C runtime.</p>