Now I understand that even today kitchen knife may be a leading cause of violent death. I'm talking about armies thinking in terms of weapons. Obviously even modern armies equip soldiers with knives and bayonets (fun fact: my Soviet-ish textbook on civil defense had pictures of SVD sniper rifle with bayonet which is hilarious) but nobody expects soldiers to use those in combat. Except perhaps some special operations units.
Anyway, I would think that when armies stopped using armor they stopped caring about melee attacks. But even in the Napoleonic Wars there were chargers and attacking with swords. And AFAIK no one used swords in WW2. So at what point proper professional armies stopped caring about melee combat?
As a follow up question, if I may, since OP mentioned WWII specifically - didn't the Soviet Union use cavalry charges with melee weapons at the beginning of WWII? If the answer is yes, how effective were those?