The this
pointer is declared as follows:
Entity* const this
which means it is a pointer to the current object, where the value of that pointer itself cannot be modified (i.e. the address that this
is pointing to cannot be modified).
In the first example, you are declaring a variable called e which is a reference to an entity (const) pointer, i.e. a reference to a (non-changing) (pointer) to an entity, which matches the type of this.
In the second example, you are declaring a reference to an entity pointer, where the value/address of this actual pointer may change. The const keyword here is not specifying the state of the pointer's address, but is rather specifying that the reference itself will not change, i.e. will not reference a new Entity*.
In fact, as pointed out, the added "const" to qualify a reference will not compile (as it is redundant and makes no sense, references cannot be modified), and therefore the follow is incorrect too:
int x = 5;
int& const y = x;
Hope this helped!