I have the following struct:
typedef struct{
static const uint8_t foo = 10;
uint8_t bar;
}foobartype_t;
When I say:
uint32_t foobarSize = sizeof(foobartype_t);
or
foobartype_t foobar;
foobar.bar = 20;
uint32_t foobarSize = sizeof(foobar);
it returns 1. Why? Environment is Qt 5.3.2 (MSVC 2010, 32 bit).