auto keyword

How does the compiler know, under the hood, what type it is?

Auto keyword strips the reference and const keyword.