The main thing it does is that it changes the type of the expression to
std::underlying_type<T>
;-). if you ask "what does it do that the C style cast doesn't do" then the answer is "nothing". The C style cast is a static cast here.