title: Typedef inside template class doesn't work
body: <p>I have a problem with the following code:</p>
  
  <pre><code>template &lt;typename U&gt;
  class lamePtr
  {
  public:
      typedef U* ptr;
  };
  
  template &lt;typename U&gt;
  class smarterPointer
  {
      public:
      void funFun()
      {
          typedef lamePtr&lt;U&gt; someType;
          someType::ptr query;
      }
  };
  </code></pre>
  
  <p>As you see, I have a typedef inside lamePtr. Inside smarterPointer class I have a function funFun(). What am I trying to do is to make another typedef someType. Till that line, everything works fine until we get to the line with someType::ptr query.</p>
  
  <p>What I want here to happen is that "query" will become lamePtr&lt; U >::ptr (a simple value, not a typedef ;). However, I get compilation errors (with gcc 4.4.3):</p>
  
  <pre><code>temp.cpp: In member function ‘void smarterPointer&ltU>::funFun()’:
  temp.cpp:15: error: expected ‘;’ before ‘query’</code></pre>
  
  <p>What am I doing wrong here?</p>