If I have a struct defined such as the following:
struct blank {
int : 0;
};
Will the compiler optimise this away to nothing at runtime?
I ask because of this rather popular SO question. I would like to employ similar compile-time checks in my own C/C++ code. I'm trying to make the program as optimal as possible, so I don't want these empty structs hanging around at runtime if I'm only going to use them for compile-time checking.
On a side note, is there a C++-idiomatic way of achieving the same outcome as in the link?