Question: Is there an IDE supporting C++ with REALLY smart searching of references? By 'reference' I mean usage of a class (or its member), variable, function in the whole Project or Workspace.

There's lots of IDE providing it. Some of them seem just to search for the text with same name giving lots of stuff, others are smarter and check the context (like class boundaries, namespace) but aren't accurate enough.

The best I've tried so far was Visual SlickEdit, but still there's more to wish.

```
class C1
{
    int foo;
};
class C2
{
    int foo;
};

```

For example in this situation when searching for `C1::foo` references I DON'T want `C2::foo` to be shown too.

So, is there an IDE that would be so smart?

**Edit2**

10x everybody for the answers so far.

I tried **Eclipse**, reference searching seems relatively good, but it takes it 20 minutes to index medium size project and 4 times of 5 it runs out of memory and crashes. I tried increasing it and some other advice and it got a little better, but still quite slow and annoying with these crashes.

I tried **KDevelop3**, but the feature mentioned in this question is not very advanced - seems to be just very advanced `grep` based text searching.

**Edit4**

**KDevelop4** - I tried to make it work, but latest beta it's quite unusable for custom makefile projects, I was unable to do anything with it.

**Edit5**  

I was surprised, but **QT Creator** did really well in my tests. It doesn't seem to create some tag/index files, but somehow manages to show very precisely the usage of variable/functions/classes. Unfortunately it seems to not work very correctly with templates, when following definitions of functions.

None of the mentioned IDEs could compete Visual SlickEdit in working with references, virtual functions, etc. QT Creator was the closest though, so I will choose it as an answer to my question.

Answer: 
No and I don't think we will ever see implementations that are as good as those in C# or Java editors for two reasons:

1) the preprocessor:

```
#ifdef _DEBUG
#define FOO(x) C1(x).foo
#else
#define FOO(x) C2(x).foo
#endif

```

2) templates:

```
template<class C> void Method(C const& c) {
    printf("%d", c.foo);
}

```

In both cases it is hard to determine which class is actually referenced.
You can look at CodeBlocks [<http://www.codeblocks.org/]>. I just started using it, but not tested for your requirement. So I am not claiming 10X now. But you can give it a try. Its open source and good one.