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

Summary: Usage of static variable defined in namespace in header is unresolved
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Code ModelAssignee: Leonid Lenyashin <lsl239>
Status: RESOLVED FIXED    
Severity: blocker CC: ksc91u
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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