A
Adrian Hawryluk
I was wondering, does this meet the criteria for "layout compatible" in
the C++ specification?
struct A {
int a[5];
};
struct B {
A b[4];
};
B obj;
int (&array)[4][5] = reinterpret_cast<int (&)[4][5]>(obj);
Regards,
Adrian
--
_____________________________________________________________________
\/Adrian_Hawryluk BSc. - Specialties: UML, OOPD, Real-Time Systems\/
\ _---_ Q. What are you doing here? _---_ /
\ / | A. Just surf'n the net, teaching and | \ /
\__/___\___ learning, learning and teaching. You?_____/___\__/
\/______[blog:__http://adrians-musings.blogspot.com/]______\/
the C++ specification?
struct A {
int a[5];
};
struct B {
A b[4];
};
B obj;
int (&array)[4][5] = reinterpret_cast<int (&)[4][5]>(obj);
Regards,
Adrian
--
_____________________________________________________________________
\/Adrian_Hawryluk BSc. - Specialties: UML, OOPD, Real-Time Systems\/
\ _---_ Q. What are you doing here? _---_ /
\ / | A. Just surf'n the net, teaching and | \ /
\__/___\___ learning, learning and teaching. You?_____/___\__/
\/______[blog:__http://adrians-musings.blogspot.com/]______\/