Edit: A lot of people say, that GWM needs a melee weapon attack, but they miss Jesses point: While GWM requires a melee attack with a heavy weapon, Sharpshooters only criteria is an attack with a ranged weapon (not a ranged weapon attack). Jesse bases his claim on the fact, that a crossbow is still a ranged weapon, even if used as an improvised weapon for melee combat. That’s why it deals 1d4(!)+20 damage. (It works with any ranged, heavy weapon btw., so Longbow qualifies too.) Of course Jesse is playing the devils advocate here and of course, no somewhat sane Walter will allow this in any campaign ever, as it’s obviously not the intention behind these feats. But you could read it that way and that’s Jesses (paperthin) point. Besides: he finds the image of a barbarian running around recklessly smashing a crossbow over everyone’s head to just be hilarious.
Your note about thrown weapons has given me a new idea on how to start an argument with my DM. Throw a dagger at someone, then watch my DM pitch a fit when I argue that I can smite because throwing the dagger is a melee weapon attack.
Far be it for me to advocate starting rules arguments, but RAW I think that works and for flavour I’ll always support ways to play paladins as something other than the melee knight in shining armour