While that function may have utility in some context, I would immediately assume that there's something existentially wrong with the context in which such a function was needed.
Ok, it's possible the entirety of it makes sense, but given that C/C++ is full of absurd shenanigans, I think odds are something is wrong with a system that needs that kind of function in the first place.
That such things are common enough doesn't make them a good practice.