title: Eclipse editor will not recognize C++ template types, when using Android NDK
body: <p>I am trying to compile the following simple C++ code as native Android code using the NDK and the Eclipse CDT:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  using namespace std;
  
  class Pt {
  public:
    Pt(int _x, int _y);
    int x;
    int y;
  };
  
  Pt::Pt(int _x, int _y){
  x = _x;
  y = _y;
  }
  
  void test(){
    std::vector&lt;Pt&gt; pts;
    pts.push_back(Pt(2,3));
    int i = pts[0].x; //error here
  }
  </code></pre>
  
  <p>I can compile the code with no problem with the <code>ndk-build.cmd</code> from the command line, and I can even compile it from within Eclipse. The problem is that at the last line (where there is the //error here comment), the Eclipse editor reports the following error:</p>
  
  <pre><code>Field 'x' could not be resolved
  </code></pre>
  
  <p>Possible solutions are:</p>
  
  <ul>
  <li>write the <code>pts[0].x</code> like that: <code>int i = ((Pt)pts[0]).x;</code></li>
  <li>use var: <code>Pt apt = pts[0]; int i = apt.x;</code> (amazingly, this works)</li>
  </ul>
  
  <p>I have spent almost 2 days trying to setup eclipse with custom paths to include files, play with the indexer, upgrade to latest NDK and everything else i can imagine. The problem remains. This problem obviously appears with every class that takes a parameterized type (not only with vector). 
  Although Eclipse does compile the code, the fact that reports this error causes the Android project to be marked as 'having errors', thus making it impossible to Run it as a whole.</p>
  
  <p>Any help is much appreciated,
  Thanks</p>