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.

Bug 136175

Summary: Local namespace hide system namespace.
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: Code CompletionAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 118037, 134091    

Description Alexander Simon 2008-05-30 15:01:16 UTC
Code example:
------------------------
#include <string>
namespace std {
    template <>
    struct less<class T*> {
        bool operator()(T const* r1, T const* r2);
    };
}
namespace xml {
    using namespace std;
    string capitalize(const string& s);
}
------------------------
Type string in the namespace xml is not resolved (no hyper link and completion).
Comment 1 Vladimir Kvashin 2008-05-30 15:18:40 UTC
Even more simple example.
Hyperlink from string doesn't work.
If you comment out std namespace definition, hyperlink works ok.

#include <string>
namespace std {
}
using namespace std;
string s;

Comment 2 Alexander Simon 2008-06-07 16:46:55 UTC
fixed
http://hg.netbeans.org/main/rev/9a9601de0f7b
Comment 3 Quality Engineering 2008-06-08 03:52:31 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #244 build
Changeset: http://hg.netbeans.org/main/rev/9a9601de0f7b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed IZ#136175:Local namespace hide system namespace.
Comment 4 Vladimir Voskresensky 2008-06-11 08:54:19 UTC
local namespace still hides system namespace elements like:
- functions (in top list of Loki)
- variables
- enumerators
- nested namespaces
Comment 5 Vladimir Voskresensky 2008-06-11 09:00:53 UTC
*** Issue 118037 has been marked as a duplicate of this issue. ***
Comment 6 Vladimir Voskresensky 2008-06-11 18:17:23 UTC
as examples, have a look in Loki 
SmartPrtr.h: std::swap(pointee_, rhs.pointee_) (and other std::swap calls)
SmallObj.cpp: std::size_t, std::cout, std::endl
...
Comment 7 Alexander Simon 2008-06-16 10:39:43 UTC
fixed
http://hg.netbeans.org/main/rev/1c5d5f520dc0