title: C++ standard: dereferencing NULL pointer to get a reference?
body: <p>I'm wondering about what the C++ standard says about code like this:</p>
  
  <pre><code>int* ptr = NULL;
  int&amp; ref = *ptr;
  int* ptr2 = &amp;ref;
  </code></pre>
  
  <p>In practice the result is that <code>ptr2</code> is NULL but I'm wondering, is this just an implementation detail or is this well defined in the standard?<br>
  Under different circumstances a dereferencing of a NULL pointer should result in a crash but here I'm dereferencing it to get a reference which is implemented by the compiler as a pointer so there's really no actual dereferencing of NULL. </p>