Why does the author emphasizes the fact that operator[] cannot return 0?
<p>The code below was copied from Bruce Eckel's Thinking in C++ Volume 2 Chapter 16</p>

<pre><code>//: C07:Wrapped.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 2000
// Copyright notice in Copyright.txt
// Safe, atomic pointers

#include &lt;fstream&gt;
#include &lt;cstdlib&gt;
using namespace std;
ofstream out("wrapped.out");

// Simplified. Yours may have other arguments.
template&lt;class T, int sz = 1&gt; class PWrap
{
    T* ptr;

    public:
    class RangeError {}; // Exception class
    PWrap() { ptr = new T[sz]; out &lt;&lt; "PWrap constructor" &lt;&lt; endl; }
    ~PWrap() { delete []ptr; out &lt;&lt; "PWrap destructor" &lt;&lt; endl; }
    T&amp; operator[](int i) throw(RangeError)
    {
        if(i &gt;= 0 &amp;&amp; i &lt; sz) return ptr[i];
        throw RangeError();
    }
};

class Cat
{
    public:
    Cat() { out &lt;&lt; "Cat()" &lt;&lt; endl; }
    ~Cat() { out &lt;&lt; "~Cat()" &lt;&lt; endl; }
    void g() {}
};

class Dog
{
    public:
    void* operator new[](size_t sz) { out &lt;&lt; "allocating a Dog" &lt;&lt; endl; throw int(47); }
    void operator delete[](void* p) { out &lt;&lt; "deallocating a Dog" &lt;&lt; endl; ::delete p; }
};

class UseResources
{
    PWrap&lt;Cat, 3&gt; Bonk;
    PWrap&lt;Dog&gt; Og;

    public:
    UseResources() : Bonk(), Og() { out &lt;&lt; "UseResources()" &lt;&lt; endl; }
    ~UseResources() { out &lt;&lt; "~UseResources()" &lt;&lt; endl; }
    void f() { Bonk[1].g(); }
};

int main()
{
    try
    {
        UseResources ur;
    }
    catch(int)
    {
        out &lt;&lt; "inside handler" &lt;&lt; endl;
    }
    catch(...)
    {
        out &lt;&lt; "inside catch(...)" &lt;&lt; endl;
    }
}
</code></pre>

<p><strong>I have no problem with the code itself. But I'm having some trouble understanding the following comment about the class exception <code>RangeError</code>:</strong></p>

<p>"The <code>PWrap</code> template shows a more typical use of exceptions than you’ve seen so far: A
nested class called <code>RangeError</code> is created to use in <code>operator[ ]</code> if its argument is out of range.
Because <code>operator[ ]</code> returns a reference it cannot return zero. (There are no null references.)
This is a true exceptional condition – you don’t know what to do in the current context, and
you can’t return an improbable value."</p>
