Version: (using KDE 3.5.9) Installed from: SuSE RPMs M m; m.foo(); // works M *m; m->foo(); // works M *m[2]; m[0]->foo(); // does not work
My mistake, I don't use plain arrays for a long time, so I forgot it is: vector<M*> m; not M *m[2]; // this works Now it looks more like a wish.
Actually the original code works for me, as long as I can make sure C++ support knows about the class. So this might just be C++ support not finding the class for some reason (and its hard to debug/find out why this happens sometimes). Thus I'm closing as worksforme.
Just tested, it is verbatim quote: #include <vector> struct A { int foo() { return 0; }; }; void bar() { using namespace std; vector<A> v; A a[10]; v[0].foo(); // does not work a[0].foo(); // works } Andreas, could you please test it. Thank you.
Hmm, I think it should work with you use std::vector and not the using directive (which is a known bug). But that doesn't work here right now either, even though std::vector is resolved. And testing with kdev4, it has the same problem. I'm re-opening.
It does not work with std::vector either. The "arrays" in summary is wrong (sorry again) -- it is templates, when built-in parser is confused.
And also confirming that with std::vector you don't get code-completion for the functions of the class in the container.
@Andreas Please don't mix up bugs for KDevelop-4 with bugs for KDevelop-3, because Maciej seems to talk about KDevelop-3, and the versions have nothing in common in that area. @Maciej: In KDevelop-3, the only thing that is not supported is the using directive within the function. Have you tried saying std::vector<A>?
David, see #5 and #6.
Ah ok. Unfortunately I'm too busy with KDevelop-4, and don't even have KDevelop-3 sources installed anymore. So unless someone else will work on this, I have to close it as WONTFIX. Maybe in a few months there will be a usable KDevelop-4 as replacement.
David, it is ok with Kdevelop3, but what about Kdevelop4 then? Is this feature fixed in KDevelop4? See #4, Andreas wrote that the same problem occurs in Kdevelop4 (I am not talking about internals, but the effect for the user).
Re-Opening for 4.0. I'm all for not yet letting users write bugreports against KDevelop4 (until we have beta releases), however we devs can use bugreports to keep track of problems we encountered and cannot fix immediately. bko is a much better place than the mailinglist, as the mailinglist makes it easy to forget things. As I said in #4 std::vector<Foo> v; v.at(1).<Ctrl+Spacebar> doesn't work in current checkout.
@Maciej: It works for me in KDevelop-4(See the mailing list). I don't know why it doesn't for Andreas. @Andreas: Let's communicate this on the mailing-list, it's simpler.
works now for me too in kdevelop4. closing.