The semicolon after the function definition is not needed. So why your compiler tolerates it?
What you see here was not allowed in C++03, but C++11 introduced so called
empty declaration, please see:
http://en.wikipedia.org/wiki/C%2B%2B0x[
^],
http://www.open-std.org/jtc1/sc22/wg21/[
^],
http://en.cppreference.com/[
^].
So, what you observe in your case is interpreted as the empty declaration. Apparently, using this semicolon makes your code just a bit less portable.
Please see:
https://developer.mozilla.org/en/C++_Portability_Guide#Don%27t_put_extra_top-level_semi-colons_in_code[
^].
However, you should not assume an unwanted semicolon cannot spoil the code. It can. There is a number of cases where it is not allowed, quite apparently. For your own good, write only the elements of the code which have some purpose and only those you perfectly understand.
Best wishes,
—SA