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 - Local namespace hide system namespace.
Summary: Local namespace hide system namespace.
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 118037 (view as bug list)
Depends on:
Blocks: 118037 134091
  Show dependency tree
 
Reported: 2008-05-30 15:01 UTC by Alexander Simon
Modified: 2008-06-16 10:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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