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.
#include <map> int main() { std::map<int,int> t; t.find() <---- } The context assist shows "find(const key_type& __x) iterator" and "find(const key_type& __x) const_iterator"", but it should show "find(const int& __x) iterator" and "find(const int& __x) const_iterator"; i.e. replacing the types according to the template parameters.
using namespace std; template <typename X> class A{ public: A(){} ~A(){} X* getX(){return m_x;} X* m_x; }; int main(int argc, char** argv) { A<int> a; a.getX(); <--- works (it shows int* as the return type)! } In this case it works. So the problem must be only with the STL support, right?
The reason is that we don't resolve return type of getX(). So if this type is template parameter we substitute it with its value, but in case of more complex type we don't do anything. So this example wont work: typedef X TX; TX* getX(){return m_x;} It's possible to resolve such types, but it could be too time expensive and we have to make additional investigations.
Hi, as the problem isn't simple, do you think this is doable for the 6.7 release? Thanks, Rolando
The problem is not difficult, but could have performance impact on completion feature. Let's see :-)
some preparation http://hg.netbeans.org/cnd-main?cmd=changeset;node=5b27912e719c http://hg.netbeans.org/cnd-main?cmd=changeset;node=15c1edcfb57f
Nice to ear that;) Does your effort for solving this issue helps in anyway issue 158692 (http://www.netbeans.org/issues/show_bug.cgi?id=158692). Seems interconnected...
Sorry, but IZs are unrelated :-)
Integrated into 'main-golden', will be available in build *200904030200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/15c1edcfb57f User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixing IZ#160442: [code completion] Template specilization handling for content assist
Created attachment 79355 [details] Possible missing type evaluation
very nice work;) I been only for a bit, but I possibly found an issue. map<int,string> m; m.begin()-> Shouldn't the the 3th option on the pair(const pair<_U1,_U2>& __p) be pair(const pair<int,string>& __p)?
consider for the next release due to lack of resources
I think that pair(const pair<_U1,_U2>& __p) shouldn't be pair(const pair<int,string>& __p). It's templated copy constructor. It's not instantiated. template<class _T1, class _T2> struct pair { // ... template<class _U1, class _U2 > pair(const pair<_U1, _U2>& __p) { //... } }; So IZ is fixed.
Hi Nick, I don't follow. template<class _T1, class _T2> struct pair { // ... template<class _U1, class _U2 > pair(const pair<_U1, _U2>& __p) { <== where _U1 = copied_pair_T1 && _U2 = copied_pair_T2, so it's recursive //... } }; The mapping should be <int,int>, right? Thanks, Rolando