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 141647 - Usage of static variable defined in namespace in header is unresolved
Summary: Usage of static variable defined in namespace in header is unresolved
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Leonid Lenyashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-25 07:01 UTC by Vladimir Kvashin
Modified: 2010-05-21 06:29 UTC (History)
1 user (show)

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 Vladimir Kvashin 2008-07-25 07:01:34 UTC
In the example below, ONE is unresolved in file_1.cc

In file header_1.h:
namespace NWS {
    static int ONE;
}

In file file_1.cc

void use_static_in_ns_hdr() {
    NWS::ONE = 1; // ONE is unresolved
}
Comment 1 Vladimir Kvashin 2008-07-25 07:05:07 UTC
Stroustrup doesn't recommend using statics in namespace at all; and I never saw such code in real life - that's why it's P4
Comment 2 Alexander Simon 2010-05-21 06:29:43 UTC
already fixed in NB6.9