I was reading this gotw and here\'s a code sample from there:
struct X {
static bool f( int* p )
{
return p && 0[p] and not p[1:>>p[2];
; is an empty statement. You can have as many empty statements as you want. It is absolutely correct.
int foobar(int arg)
{
return 0;
};
is the same as
int foobar(int arg)
{
return 0;
}
/*DO NOTHING*/;
Similar question: Why are empty expressions legal in C/C++?
Edit:
A declaration of a member is also a statement. So empty statement inside class is something like an << empty >> declaration statement inside class :)