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
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/83096425d641ab2bdbbf153b3a4998b3fb430dd2 fix Issue 10117 - Support C++ class-scope static variables https://github.com/D-Programming-Language/dmd/commit/be3653bc3e80938a177e7bffda69ff00391bc558 Merge pull request #2053 from IgorStepanov/cppstaticvar fix Issue 10117 - Support C++ class-scope static variables