Are the attributes of a struct inherited in C++
eg:
struct A {
int a;
int b;
}__attribute__((__packed__));
struct B : A {
list<int> l;
};
will the inherited part of struct B (struct A) inherit the packed attribute?
I cannot add an a attribute((packed)) to struct B without getting a compiler warning:
ignoring packed attribute because of unpacked non-POD field
So I know that the entire struct B will not be packed, which is fine in my use case, but I require the fields of struct A to be packed in struct B.