Bug 10117 – Support C++ class-scope static variables
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-19T08:34:00Z
Last change time
2013-05-31T17:55:50Z
Assigned to
nobody
Creator
wazar.leollone
Comments
Comment #0 by wazar.leollone — 2013-05-19T08:34:31Z
//C++
class CPPTest1
{
static int cppfield;
};
int CPPTest1::cppfield = 42;
//D
extern(C++) struct CPPTest1
{
extern __gshared int cppfield;
}
***************************************
//C++
class CPPTest1
{
static int dfield;
};
//D
extern(C++) struct CPPTest1
{
__gshared int dfield; //only __gshared D static variables can be supported.
}
Comment #1 by github-bugzilla — 2013-05-31T17:55:17Z