Re: [eigen] strange sizeof on windows |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Benoit Jacob schrieb:
Hi Frank, Thank you very much. Together with Robert's remark, I am starting to have a terrible fear:could it be that with MSVC, inheriting an empty struct increases the sizeof? Normally this shouldn't be the case (by contrast, having an empty struct as member does normally increase the sizeof) can you try this: struct empty {}; struct foo : empty { float x; }; and print sizeof(foo), sizeof(empty), sizeof(float) ?
Sure, sizeof(foo) = 4 sizeof(empty) = 1 sizeof(float) = 4 ---
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |