M
Marcel Müller
When I get a struct offset from a C style API as int. I.e.:
struct S
{ int I1;
double D1;
int I2;
};
int offset = offsetof(S, I2);
Now in C++ code I would like to convert this offset to a type safe C++
member pointer of type int S::*. Older gcc versions simply accepted a
cast, newer version reject the cast.
Marcel
struct S
{ int I1;
double D1;
int I2;
};
int offset = offsetof(S, I2);
Now in C++ code I would like to convert this offset to a type safe C++
member pointer of type int S::*. Older gcc versions simply accepted a
cast, newer version reject the cast.
Marcel