This is not just "before class", rather, this is the part of the specification of the return type of the operator "++".
You you have a type
SomeType
, the notation
SomeType&
means another type, "a reference to the instance of the type SomeType", and the
consts
makes the constant-modified variant the the same type, that is, the notation
const SomeType&
means "a reference to the instance of the type SomeType; and the instance cannot be modified through this reference".
This
const
modification can be considered as syntactic sugar and a fool-proof feature protecting the
variable of the type
const SomeType&
from modification of the instance, but the value of the variable itself can be modified, as you can assign a different reference of the same type to it later on.
C++ references are well explained here, with their semantics and usage:
http://en.wikipedia.org/wiki/Reference_%28C%2B%2B%29[
^].
—SA