digitalmars.D.bugs - [Bug 167] New: .offsetof doesn't work when a struct/union/class is the target
- d-bugmail puremagic.com (29/29) May 30 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=167
http://d.puremagic.com/bugzilla/show_bug.cgi?id=167
           Summary: .offsetof doesn't work when a struct/union/class is the
                    target
           Product: D
           Version: 0.159
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: h3r3tic mat.uni.torun.pl
struct o_O { int a; }
union  O_O { int a; }
class  O_o { int a; }
struct Foo {
    int ok;
    o_O foo;
    O_O bar;
    O_o baz;
}
void main() {
    int o1 = Foo.ok.offsetof;       // ok
    int o2 = Foo.foo.offsetof;      // blah
    int o3 = Foo.bar.offsetof;      // blah
    int o4 = Foo.baz.offsetof;      // blah
}
-- 
 May 30 2006








 
  
  
  d-bugmail puremagic.com
 d-bugmail puremagic.com