What you are describing is legal C ++.
The effect on compilation time will depend on the compiler. However, in practice, it will probably be difficult for you to find any difference in compilation time.
. - , . , "" (, (public, private protected)) , (, ). , , , . - . , , , - , .. ..
. ++ , -. , ( ) ( , ..), . . , (), , , .