That's the whole point. =] This is a surprising aspect of C++: the shift expression doesn't have the type of the declared variable.
The integer literals we are shifting are of 'int' type, and the shift occurs at that type (based on the usual arithmetic conversions). There is stack overflow question with explanations and a good blog post here about it: