[Issue 10117] New: Support C++ class-scope static variables

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 19 08:34:32 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10117

           Summary: Support C++ class-scope static variables
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: wazar.leollone at yahoo.com


--- Comment #0 from Igor Stepanov <wazar.leollone at yahoo.com> 2013-05-19 08:34:31 PDT ---
//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. 
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list