Hi,

I have used omni for almost a year. It works well for me except one problem
for template class.

I am using some libraries where there are many typedefs for template class.
Omni seems not to work well for that.

Omni indeed works well in some situations.
For example,
std::vector<float>  a;
a.<C-O>
<C-O> means omni completion. It works well in this code.
and for std::vector::<C-O>, it also works well.

But if I want to complete std::vector<float>::<C-O>, it dose not work at
all.
And for typedefs, it works well for simple classes, but not for template
classes.
Please see attached cpp file.
It compiles in gcc 4.3.
I wrote the omni work status in comments.

Is there someone who meet the some problem with omni?
How to solve the problem?
Thank you very much.

Jian Cheng

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
#include <cstdio>
#include <cstdarg>
#include <vector>




#include <stdio.h>
#include <iostream>

#include <string.h>


class c1
{
public:
  float m_1;
};

// =====================================================================================
//        Class:  cc1
//  Description:  
// =====================================================================================

template < typename T >
class tc1 
{
  public:
    T tm_1;

  protected:

  private:

}; // -----  end of template class cc1  -----


int main(int argc, char* argv[])
{
  
  std::vector<float> a;
  a.push_back(1.0); // ok
  typedef std::vector<float> data_type;
  data_type b;  
  b.push_back(1.0);  // omni dose not work

  c1 aa;
  aa.m_1;   // ok
  typedef c1 c2;
  c2 bb;  // ok
  bb.m_1;

  tc1<float> taa;
  taa.tm_1; //ok
  typedef tc1<float> tc2;
  tc2 tbb;
  tbb.tm_1;  // omni does not work

  return 0;
}

Reply via email to