This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 124591 [details] No suggestions. Hello all... I have some "interface" class with method "virtual double eval(double) const = 0" and typedef "typedef ::std::shared_ptr<ISomeInterface> ISomeInterfacePtr. I have another class holds ISomeInterfacePtr _kernel. When i type "_kernel->" in method body, i suggest autocompletion to show me ISomeInterface methods, but it shows "no suggestions". Also if i type "_kernel." it shows me "no suggestions" instead of ::Std::shared_ptr methods. Example in attachment.
same with std::unique_ptr
Somehow it looks as a duplicate, but I might be wrong
I guess the problem is that __GXX_EXPERIMENTAL_CXX0X__ is not defined. *** This bug has been marked as a duplicate of bug 214186 ***
(In reply to comment #3) > I guess the problem is that __GXX_EXPERIMENTAL_CXX0X__ is not defined. > > *** This bug has been marked as a duplicate of bug 214186 *** That is incorrect, __GXX_EXPERIMENTAL_CXX0X__ is defined. I can compile std::shared_ptr and unique_ptr but get suggestions from shared_ptr in operator-> instead of the pointee. If __GXX_EXPERIMENTAL_CXX0X__ wasn't define, I wouldn't be able to compile or run
Yes. Bug is persist if i manually define __GXX_EXPERIMENTAL_CXX0X__ ...
Bug is persist if i manually define __GXX_EXPERIMENTAL_CXX0X__ . NetBeans IDE Dev (Build 201210270001) (fix bug http://netbeans.org/bugzilla/show_bug.cgi?id=216570) gcc 4.7.2 mingw
OK, so this does indeed work for std::shared_ptr. What nnnnnk was talking about here wasn't about defining __GXX_EXPERIMENTAL_CXX0X__ for the project but defining __GXX_EXPERIMENTAL_CXX0X__ for Netbeans' internal parser. So invoking operator-> on std::shared_ptr does produce correct results now. However, what's strange is that std::unique_ptr doesn't produce any errors in the editor but it still doesn't produce any suggestions either, it just says "No suggestions" So I think this should stay open for std::unique_ptr (In reply to comment #3) > I guess the problem is that __GXX_EXPERIMENTAL_CXX0X__ is not defined. > > *** This bug has been marked as a duplicate of bug 214186 ***
Sample: template <typename _Tp, typename _Dp> class my_unique_ptr { class _Pointer { template<typename _Up> static typename _Up::pointer __test(typename _Up::pointer*); template<typename _Up> static _Tp* __test(...); typedef int _Del; public: typedef decltype(__test<_Del>(0)) type; //typedef _Tp* type; }; public: typedef typename _Pointer::type pointer; pointer operator->() const { return 0; } }; struct A { int i; }; int main(int argc, char** argv) { my_unique_ptr<A> ptr; ptr->i++; }
There is a problem with decltype(__test<_Del>(0)) calculation. Service that would calculate type of expression string in specified context is needed.
Hello, all... In NetBeans IDE Dev (Build 201301260001) version autocomplete with ::std::shared_ptr works fine, can anybody confirm this?
Hm, i've investigated this a bit, and sometimes autocompletion it works, sometimes does not work... It looks like it depends from code complexity, because it works with simple code and does not work in complicated...
I just checked NetBeans IDE 7.3 RC2 (Build 201302050851). Suggestions still do not work with std::shared_ptr if the variable is declared with "auto". Ex: for (auto it : vector<shared_ptr<item> > ) However, suggestions do work if the "auto" variable is declared by locking a weak pointer. Ex: if (auto item = weak_ptr<item>.lock()) It's getting better but still needs some work. Thanks to whoever is working on this.
Works in Build 201307062300...