I was wondering what could be the size of an object of an empty class. It surely could not be 0 bytes since it should be possible to reference and
There is an exception: 0-length arrays
#include class CompletlyEmpty { char NO_DATA[0]; }; int main(int argc, const char** argv) { std::cout << sizeof(CompletlyEmpty) << '\n'; }